diff --git a/sdk/communication/azure-communication-callautomation/CHANGELOG.md b/sdk/communication/azure-communication-callautomation/CHANGELOG.md index 877f16b93353..1a4f8136946f 100644 --- a/sdk/communication/azure-communication-callautomation/CHANGELOG.md +++ b/sdk/communication/azure-communication-callautomation/CHANGELOG.md @@ -4,8 +4,6 @@ ### Features Added -- Support for recording result api. - ### Breaking Changes ### Bugs Fixed @@ -22,16 +20,16 @@ - Upgraded `azure-core-http-netty` from `1.15.11` to version `1.15.12`. - Upgraded `azure-core` from `1.55.3` to version `1.55.4`. - ## 1.4.0 (2025-06-05) ### Features Added -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Real-time transcription support +- Audio and DTMF streaming capabilities +- Integration of ConnectAPI for seamless streaming and transcription +- Improved media streaming with bidirectional functionality, allowing audio formats in both directions, currently supporting sample rates of 24kHz and 16kHz +- Support for custom speech models has been integrated into transcription +- A confidence level for recognized speech has been introduced, ranging from 0.0 to 1.0 when available ## 1.3.3 (2025-03-24) @@ -54,6 +52,16 @@ - Upgraded `azure-core-http-netty` from `1.15.7` to version `1.15.10`. - Upgraded `azure-core` from `1.54.1` to version `1.55.2`. +## 1.3.1 (2024-12-04) + +### Other Changes + +#### Dependency Updates + +- Upgraded `azure-core` from `1.53.0` to version `1.54.1`. +- Upgraded `azure-core-http-netty` from `1.15.5` to version `1.15.7`. +- Upgraded `azure-communication-common` from `1.3.7` to version `1.3.8`. + ## 1.4.0-beta.1 (2024-11-22) ### Features Added diff --git a/sdk/communication/azure-communication-callautomation/README.md b/sdk/communication/azure-communication-callautomation/README.md index 033189d8d86d..91a892677c5d 100644 --- a/sdk/communication/azure-communication-callautomation/README.md +++ b/sdk/communication/azure-communication-callautomation/README.md @@ -22,7 +22,7 @@ This package contains a Java SDK for Azure Communication Call Automation Service com.azure azure-communication-callautomation - 1.4.0-beta.2 + 1.4.1 ``` diff --git a/sdk/communication/azure-communication-callautomation/assets.json b/sdk/communication/azure-communication-callautomation/assets.json index 310249cd1bfe..21b7d98c5e78 100644 --- a/sdk/communication/azure-communication-callautomation/assets.json +++ b/sdk/communication/azure-communication-callautomation/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "java", "TagPrefix": "java/communication/azure-communication-callautomation", - "Tag": "java/communication/azure-communication-callautomation_d495ba2a2c" + "Tag": "java/communication/azure-communication-callautomation_33108318f9" } diff --git a/sdk/communication/azure-communication-callautomation/pom.xml b/sdk/communication/azure-communication-callautomation/pom.xml index b99fdc370935..7598f476794f 100644 --- a/sdk/communication/azure-communication-callautomation/pom.xml +++ b/sdk/communication/azure-communication-callautomation/pom.xml @@ -95,6 +95,12 @@ 9.37.3 test + + org.hamcrest + hamcrest-all + 1.3 + test + com.azure azure-identity 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 93ca1f607b81..53ab302185bd 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 @@ -5,13 +5,11 @@ import com.azure.communication.callautomation.implementation.AzureCommunicationCallAutomationServiceImpl; import com.azure.communication.callautomation.implementation.CallConnectionsImpl; -import com.azure.communication.callautomation.implementation.CallDialogsImpl; import com.azure.communication.callautomation.implementation.CallMediasImpl; import com.azure.communication.callautomation.implementation.CallRecordingsImpl; import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.CommunicationUserIdentifierConverter; -import com.azure.communication.callautomation.implementation.converters.MicrosoftTeamsAppIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter; import com.azure.communication.callautomation.implementation.models.AnswerCallRequestInternal; import com.azure.communication.callautomation.implementation.models.AudioFormatInternal; @@ -23,15 +21,14 @@ import com.azure.communication.callautomation.implementation.models.CommunicationUserIdentifierModel; import com.azure.communication.callautomation.implementation.models.ConnectRequestInternal; import com.azure.communication.callautomation.implementation.models.CreateCallRequestInternal; -import com.azure.communication.callautomation.implementation.models.CustomCallingContext; import com.azure.communication.callautomation.implementation.models.MediaStreamingAudioChannelTypeInternal; import com.azure.communication.callautomation.implementation.models.MediaStreamingContentTypeInternal; import com.azure.communication.callautomation.implementation.models.MediaStreamingOptionsInternal; -import com.azure.communication.callautomation.implementation.models.MediaStreamingTransportTypeInternal; import com.azure.communication.callautomation.implementation.models.RedirectCallRequestInternal; import com.azure.communication.callautomation.implementation.models.RejectCallRequestInternal; import com.azure.communication.callautomation.implementation.models.TranscriptionOptionsInternal; -import com.azure.communication.callautomation.implementation.models.TranscriptionTransportTypeInternal; +import com.azure.communication.callautomation.implementation.models.WebSocketMediaStreamingOptionsInternal; +import com.azure.communication.callautomation.implementation.models.WebSocketTranscriptionOptionsInternal; import com.azure.communication.callautomation.models.AnswerCallOptions; import com.azure.communication.callautomation.models.AnswerCallResult; import com.azure.communication.callautomation.models.CallInvite; @@ -87,22 +84,18 @@ public final class CallAutomationAsyncClient { private final AzureCommunicationCallAutomationServiceImpl azureCommunicationCallAutomationServiceInternal; private final CallRecordingsImpl callRecordingsInternal; private final CallMediasImpl callMediasInternal; - private final CallDialogsImpl callDialogsInternal; private final ClientLogger logger; private final ContentDownloader contentDownloader; private final HttpPipeline httpPipelineInternal; private final String resourceUrl; private final CommunicationUserIdentifierModel sourceIdentity; - private final CallAutomationEventProcessor eventProcessor; CallAutomationAsyncClient(AzureCommunicationCallAutomationServiceImpl callServiceClient, - CommunicationUserIdentifier sourceIdentity, CallAutomationEventProcessor eventProcessor) { + CommunicationUserIdentifier sourceIdentity) { this.callConnectionsInternal = callServiceClient.getCallConnections(); this.azureCommunicationCallAutomationServiceInternal = callServiceClient; this.callRecordingsInternal = callServiceClient.getCallRecordings(); this.callMediasInternal = callServiceClient.getCallMedias(); - this.callDialogsInternal = callServiceClient.getCallDialogs(); - this.eventProcessor = eventProcessor; this.logger = new ClientLogger(CallAutomationAsyncClient.class); this.contentDownloader = new ContentDownloader(callServiceClient.getEndpoint(), callServiceClient.getHttpPipeline()); @@ -112,14 +105,6 @@ public final class CallAutomationAsyncClient { = sourceIdentity == null ? null : CommunicationUserIdentifierConverter.convert(sourceIdentity); } - /** - * Get the event processor for handling events. - * @return {@link CallAutomationEventProcessor} as event processor - */ - public CallAutomationEventProcessor getEventProcessor() { - return eventProcessor; - } - /** * Get Source Identity that is used for create and answer call * @return {@link CommunicationUserIdentifier} represent source @@ -230,11 +215,6 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions callIntelligenceOptionsInternal = new CallIntelligenceOptionsInternal(); callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( createCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - - if (createCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - createCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } } CreateCallRequestInternal request = new CreateCallRequestInternal() @@ -242,20 +222,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateCallOptions PhoneNumberIdentifierConverter.convert(createCallOptions.getCallInvite().getSourceCallerIdNumber())) .setSourceDisplayName(createCallOptions.getCallInvite().getSourceDisplayName()) .setSource(sourceIdentity) - .setTeamsAppSource(MicrosoftTeamsAppIdentifierConverter.convert(createCallOptions.getTeamsAppSource())) .setTargets(targetsModel) .setCallbackUri(createCallOptions.getCallbackUrl()) .setCallIntelligenceOptions(callIntelligenceOptionsInternal) .setOperationContext(createCallOptions.getOperationContext()); - // Need to do a null check since SipHeaders and VoipHeaders are optional; If they both are null then we do not need to set custom context - if (createCallOptions.getCallInvite().getCustomCallingContext().getSipHeaders() != null - || createCallOptions.getCallInvite().getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(createCallOptions.getCallInvite().getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders(createCallOptions.getCallInvite().getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } if (createCallOptions.getMediaStreamingOptions() != null) { MediaStreamingOptionsInternal streamingOptionsInternal = getMediaStreamingOptionsInternal(createCallOptions.getMediaStreamingOptions()); @@ -283,11 +254,6 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp callIntelligenceOptionsInternal = new CallIntelligenceOptionsInternal(); callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( createCallGroupOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - - if (createCallGroupOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - createCallGroupOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } } CreateCallRequestInternal request = new CreateCallRequestInternal() @@ -295,19 +261,11 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp PhoneNumberIdentifierConverter.convert(createCallGroupOptions.getSourceCallIdNumber())) .setSourceDisplayName(createCallGroupOptions.getSourceDisplayName()) .setSource(sourceIdentity) - .setTeamsAppSource(MicrosoftTeamsAppIdentifierConverter.convert(createCallGroupOptions.getTeamsAppSource())) .setTargets(targetsModel) .setCallbackUri(createCallGroupOptions.getCallbackUrl()) .setCallIntelligenceOptions(callIntelligenceOptionsInternal) .setOperationContext(createCallGroupOptions.getOperationContext()); - if (createCallGroupOptions.getCustomContext().getSipHeaders() != null - || createCallGroupOptions.getCustomContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(createCallGroupOptions.getCustomContext().getSipHeaders()); - customContext.setVoipHeaders(createCallGroupOptions.getCustomContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } if (createCallGroupOptions.getMediaStreamingOptions() != null) { MediaStreamingOptionsInternal streamingOptionsInternal = getMediaStreamingOptionsInternal(createCallGroupOptions.getMediaStreamingOptions()); @@ -325,26 +283,23 @@ private CreateCallRequestInternal getCreateCallRequestInternal(CreateGroupCallOp private MediaStreamingOptionsInternal getMediaStreamingOptionsInternal(MediaStreamingOptions mediaStreamingOptions) { - return new MediaStreamingOptionsInternal().setTransportUrl(mediaStreamingOptions.getTransportUrl()) + return new WebSocketMediaStreamingOptionsInternal().setTransportUrl(mediaStreamingOptions.getTransportUrl()) .setAudioChannelType(MediaStreamingAudioChannelTypeInternal .fromString(mediaStreamingOptions.getAudioChannelType().toString())) .setContentType( MediaStreamingContentTypeInternal.fromString(mediaStreamingOptions.getContentType().toString())) - .setTransportType( - MediaStreamingTransportTypeInternal.fromString(mediaStreamingOptions.getTransportType().toString())) .setStartMediaStreaming(mediaStreamingOptions.isStartMediaStreamingEnabled()) .setEnableBidirectional(mediaStreamingOptions.isEnableBidirectional()) .setAudioFormat(AudioFormatInternal.fromString(mediaStreamingOptions.getAudioFormat() != null ? mediaStreamingOptions.getAudioFormat().toString() - : null)); + : null)) + .setEnableDtmfTones(mediaStreamingOptions.isEnableDtmfTones()); } private TranscriptionOptionsInternal getTranscriptionOptionsInternal(TranscriptionOptions transcriptionOptions) { - return new TranscriptionOptionsInternal().setTransportUrl(transcriptionOptions.getTransportUrl()) - .setTransportType( - TranscriptionTransportTypeInternal.fromString(transcriptionOptions.getTransportType().toString())) + return new WebSocketTranscriptionOptionsInternal().setTransportUrl(transcriptionOptions.getTransportUrl()) .setLocale(transcriptionOptions.getLocale()) - .setStartTranscription(transcriptionOptions.getStartTranscription()) + .setStartTranscription(transcriptionOptions.isStartTranscription()) .setEnableIntermediateResults(transcriptionOptions.isIntermediateResultsEnabled()) .setSpeechModelEndpointId(transcriptionOptions.getSpeechRecognitionModelEndpointId()); } @@ -394,11 +349,6 @@ Mono> answerCallWithResponseInternal(AnswerCallOption callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( answerCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - if (answerCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - answerCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } - request.setCallIntelligenceOptions(callIntelligenceOptionsInternal); } @@ -413,25 +363,15 @@ Mono> answerCallWithResponseInternal(AnswerCallOption = getTranscriptionOptionsInternal(answerCallOptions.getTranscriptionOptions()); request.setTranscriptionOptions(transcriptionOptionsInternal); } - if (answerCallOptions.getCustomCallingContext().getSipHeaders() != null - || answerCallOptions.getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders(answerCallOptions.getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders(answerCallOptions.getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } return azureCommunicationCallAutomationServiceInternal.answerCallWithResponseAsync(request, context) .map(response -> { try { CallConnectionAsync callConnectionAsync = getCallConnectionAsync(response.getValue().getCallConnectionId()); - AnswerCallResult result - = new AnswerCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), - new CallConnection(callConnectionAsync), callConnectionAsync); - result.setEventProcessor(eventProcessor, response.getValue().getCallConnectionId(), null); - - return new SimpleResponse<>(response, result); + return new SimpleResponse<>(response, + new AnswerCallResult(CallConnectionPropertiesConstructorProxy.create(response.getValue()), + new CallConnection(callConnectionAsync), callConnectionAsync)); } catch (URISyntaxException e) { throw logger.logExceptionAsError(new RuntimeException(e)); } @@ -478,16 +418,6 @@ Mono> redirectCallWithResponseInternal(RedirectCallOptions redire .setTarget(CommunicationIdentifierConverter .convert(redirectCallOptions.getTargetParticipant().getTargetParticipant())); - // Need to do a null check since SipHeaders and VoipHeaders are optional; If they both are null then we do not need to set custom context - if (redirectCallOptions.getTargetParticipant().getCustomCallingContext().getSipHeaders() != null - || redirectCallOptions.getTargetParticipant().getCustomCallingContext().getVoipHeaders() != null) { - CustomCallingContext customContext = new CustomCallingContext(); - customContext.setSipHeaders( - redirectCallOptions.getTargetParticipant().getCustomCallingContext().getSipHeaders()); - customContext.setVoipHeaders( - redirectCallOptions.getTargetParticipant().getCustomCallingContext().getVoipHeaders()); - request.setCustomCallingContext(customContext); - } return azureCommunicationCallAutomationServiceInternal.redirectCallWithResponseAsync(request, context); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -598,14 +528,21 @@ Mono> connectCallWithResponseInternal(ConnectCallOpt callIntelligenceOptionsInternal.setCognitiveServicesEndpoint( connectCallOptions.getCallIntelligenceOptions().getCognitiveServicesEndpoint()); - if (connectCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint() != null) { - callIntelligenceOptionsInternal.setBackupCognitiveServicesEndpoint( - connectCallOptions.getCallIntelligenceOptions().getBackupCognitiveServicesEndpoint()); - } - request.setCallIntelligenceOptions(callIntelligenceOptionsInternal); } + if (connectCallOptions.getMediaStreamingOptions() != null) { + MediaStreamingOptionsInternal streamingOptionsInternal + = getMediaStreamingOptionsInternal(connectCallOptions.getMediaStreamingOptions()); + request.setMediaStreamingOptions(streamingOptionsInternal); + } + + if (connectCallOptions.getTranscriptionOptions() != null) { + TranscriptionOptionsInternal transcriptionOptionsInternal + = getTranscriptionOptionsInternal(connectCallOptions.getTranscriptionOptions()); + request.setTranscriptionOptions(transcriptionOptionsInternal); + } + return azureCommunicationCallAutomationServiceInternal.connectWithResponseAsync(request, context) .map(response -> { try { @@ -632,8 +569,7 @@ Mono> connectCallWithResponseInternal(ConnectCallOpt * @return a CallContentAsync. */ public CallConnectionAsync getCallConnectionAsync(String callConnectionId) { - return new CallConnectionAsync(callConnectionId, callConnectionsInternal, callMediasInternal, - callDialogsInternal, eventProcessor); + return new CallConnectionAsync(callConnectionId, callConnectionsInternal, callMediasInternal); } //endregion diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java index 0fb7004ddccf..389f11d17dcd 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClient.java @@ -42,14 +42,6 @@ public final class CallAutomationClient { this.callAutomationAsyncClient = callAutomationAsyncClient; } - /** - * Get the event processor for handling events. - * @return {@link CallAutomationEventProcessor} as event processor - */ - public CallAutomationEventProcessor getEventProcessor() { - return callAutomationAsyncClient.getEventProcessor(); - } - /** * Get Source Identity that is used for create and answer call * @return {@link CommunicationUserIdentifier} represent source diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java index 7ddc5d0a276e..30a224565982 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationClientBuilder.java @@ -101,17 +101,6 @@ public CallAutomationClientBuilder endpoint(String endpoint) { return this; } - /** - * Set pma endpoint override of the service. - * - * @param pmaEndpoint url of the service. - * @return CallAutomationClientBuilder object. - */ - public CallAutomationClientBuilder pmaEndpoint(String pmaEndpoint) { - this.pmaEndpoint = Objects.requireNonNull(pmaEndpoint, "'pmaEndpoint' cannot be null."); - return this; - } - /** * Sets the {@link HttpPipeline} to use for the service client. * @@ -319,7 +308,7 @@ public CallAutomationClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { * and {@link #retryPolicy(RetryPolicy)} have been set. */ public CallAutomationAsyncClient buildAsyncClient() { - return new CallAutomationAsyncClient(createServiceImpl(), sourceIdentity, new CallAutomationEventProcessor()); + return new CallAutomationAsyncClient(createServiceImpl(), sourceIdentity); } /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java index 25d626fc2c2e..ec5380353d13 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java @@ -23,20 +23,7 @@ import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneFailed; import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneReceived; import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogConsent; -import com.azure.communication.callautomation.models.events.DialogFailed; -import com.azure.communication.callautomation.models.events.DialogHangup; -import com.azure.communication.callautomation.models.events.DialogLanguageChange; -import com.azure.communication.callautomation.models.events.DialogSensitivityUpdate; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.callautomation.models.events.DialogTransfer; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; import com.azure.communication.callautomation.models.events.HoldFailed; -import com.azure.communication.callautomation.models.events.IncomingCall; import com.azure.communication.callautomation.models.events.MediaStreamingFailed; import com.azure.communication.callautomation.models.events.MediaStreamingStarted; import com.azure.communication.callautomation.models.events.MediaStreamingStopped; @@ -44,8 +31,6 @@ import com.azure.communication.callautomation.models.events.PlayCanceled; import com.azure.communication.callautomation.models.events.PlayCompleted; import com.azure.communication.callautomation.models.events.PlayFailed; -import com.azure.communication.callautomation.models.events.PlayPaused; -import com.azure.communication.callautomation.models.events.PlayResumed; import com.azure.communication.callautomation.models.events.PlayStarted; import com.azure.communication.callautomation.models.events.RecognizeCanceled; import com.azure.communication.callautomation.models.events.RecognizeCompleted; @@ -55,7 +40,6 @@ import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; import com.azure.communication.callautomation.models.events.SendDtmfTonesFailed; -import com.azure.communication.callautomation.models.events.StartRecordingFailed; import com.azure.communication.callautomation.models.events.TranscriptionFailed; import com.azure.communication.callautomation.models.events.TranscriptionResumed; import com.azure.communication.callautomation.models.events.TranscriptionStarted; @@ -123,8 +107,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = CallConnected.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CallDisconnected")) { ret = CallDisconnected.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.IncomingCall")) { - ret = IncomingCall.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantFailed")) { ret = AddParticipantFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantSucceeded")) { @@ -137,8 +119,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = ParticipantsUpdated.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecordingStateChanged")) { ret = RecordingStateChanged.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.StartRecordingFailed")) { - ret = StartRecordingFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayCompleted")) { ret = PlayCompleted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayFailed")) { @@ -147,10 +127,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = PlayStarted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.PlayCanceled")) { ret = PlayCanceled.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.PlayPaused")) { - ret = PlayPaused.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.PlayResumed")) { - ret = PlayResumed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecognizeCompleted")) { ret = RecognizeCompleted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.RecognizeFailed")) { @@ -175,22 +151,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = CancelAddParticipantSucceeded.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CancelAddParticipantFailed")) { ret = CancelAddParticipantFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogStarted")) { - ret = DialogStarted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogCompleted")) { - ret = DialogCompleted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogFailed")) { - ret = DialogFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogConsent")) { - ret = DialogConsent.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogHangup")) { - ret = DialogHangup.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogLanguageChange")) { - ret = DialogLanguageChange.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogTransfer")) { - ret = DialogTransfer.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.DialogSensitivityUpdate")) { - ret = DialogSensitivityUpdate.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.TranscriptionStarted")) { ret = TranscriptionStarted.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.TranscriptionFailed")) { @@ -205,14 +165,6 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String ret = AnswerFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.CreateCallFailed")) { ret = CreateCallFailed.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioCompleted")) { - ret = HoldAudioCompleted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioStarted")) { - ret = HoldAudioStarted.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioPaused")) { - ret = HoldAudioPaused.fromJson(jsonReader); - } else if (Objects.equals(eventType, "Microsoft.Communication.HoldAudioResumed")) { - ret = HoldAudioResumed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.HoldFailed")) { ret = HoldFailed.fromJson(jsonReader); } else if (Objects.equals(eventType, "Microsoft.Communication.ConnectFailed")) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java deleted file mode 100644 index 03214312daee..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventProcessor.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiter; -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiterOngoing; -import com.azure.communication.callautomation.implementation.eventprocessor.EventAwaiterSingleTime; -import com.azure.communication.callautomation.implementation.eventprocessor.EventBacklog; -import com.azure.communication.callautomation.implementation.eventprocessor.EventWithBacklogId; -import com.azure.communication.callautomation.implementation.eventprocessor.OngoingEventAwaiterKey; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallDisconnected; -import com.azure.core.util.logging.ClientLogger; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.function.Consumer; -import java.util.function.Predicate; - -/** - * Call Automation's EventProcessor for incoming events for ease of use. - */ -public final class CallAutomationEventProcessor { - private final EventBacklog eventBacklog; - private final HashSet eventAwaiters; - private static final ClientLogger LOGGER = new ClientLogger(CallAutomationEventProcessor.class); - private static final int DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS = 240; - - // Key: Map entry of ConnectionId and Event class, Value: ongoingEventAwaiter - // Used to keep track of all ongoing event awaiters. - private final ConcurrentHashMap, EventAwaiterOngoing> ongoingEventAwaiters; - - /** - * Constructor of the event processor - */ - CallAutomationEventProcessor() { - eventBacklog = new EventBacklog(); - eventAwaiters = new HashSet<>(); - ongoingEventAwaiters = new ConcurrentHashMap<>(); - } - - /** - * Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function. - * @param requestBody Incoming event request's body in string. - */ - public void processEvents(String requestBody) { - List receivedEvents = CallAutomationEventParser.parseEvents(requestBody); - if (receivedEvents.isEmpty()) { - return; - } - processEvents(receivedEvents); - } - - /** - * Process incoming events. Pass incoming events to get it processed to have other method like WaitForEventProcessor to function. - * @param events Incoming event in a list that after CallAutomationEventParser processing. - */ - public void processEvents(List events) { - // Note: There will always be only 1 event coming from the service - CallAutomationEventBase receivedEvent = events.get(0); - String backlogEventId = UUID.randomUUID().toString(); - EventWithBacklogId receivedEventWithBacklogId = eventBacklog.addEvent(backlogEventId, receivedEvent); - - // Each event awaiter should be notified and check if this is the event it is looking for. - eventAwaiters.forEach(eventAwaiter -> { - eventAwaiter.onEventsReceived(receivedEventWithBacklogId); - }); - - // If this call is about to disconnect, remove all related items in memory - if (receivedEvent instanceof CallDisconnected) { - // remove the event from eventBacklog - eventBacklog.removeEvent(backlogEventId); - // remove from ongoingevent list - removeFromOngoingEvent(receivedEvent.getCallConnectionId()); - } - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - public TEvent waitForEventProcessor(String connectionId, - String operationContext, Class eventType) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - public TEvent waitForEventProcessor(String connectionId, - String operationContext, Class eventType, Duration timeout) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType, timeout).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @return Returns the event once matching event arrives. - */ - public CallAutomationEventBase waitForEventProcessor(Predicate predicate) { - return waitForEventProcessorAsync(predicate).block(); - } - - /** - * Wait for matching incoming event. This is blocking Call. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - */ - public CallAutomationEventBase waitForEventProcessor(Predicate predicate, - Duration timeout) { - return waitForEventProcessorAsync(predicate, timeout).block(); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - @SuppressWarnings("unchecked") - public Mono waitForEventProcessorAsync(String connectionId, - String operationContext, Class eventType) { - return waitForEventProcessorAsync(connectionId, operationContext, eventType, - Duration.ofSeconds(DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS)); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param connectionId Call connection id of the call. - * @param operationContext OperationContext of the method. - * @param eventType The event type that is being waited. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @param Any CallAutomation events. - */ - @SuppressWarnings("unchecked") - public Mono waitForEventProcessorAsync(String connectionId, - String operationContext, Class eventType, Duration timeout) { - Mono ret = waitForEventProcessorAsync( - event -> (Objects.equals(event.getCallConnectionId(), connectionId) || Objects.isNull(connectionId)) - && (Objects.equals(event.getOperationContext(), operationContext) || Objects.isNull(operationContext)) - && event.getClass() == eventType, - timeout); - - return ret.map(event -> event == null ? null : (TEvent) event); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @return Returns the event once matching event arrives. - * @throws RuntimeException all checked exceptions if the logic fails. - */ - public Mono waitForEventProcessorAsync(Predicate predicate) { - return waitForEventProcessorAsync(predicate, Duration.ofSeconds(DEFAULT_EVENT_AWAITER_EXPIRATION_SECONDS)); - } - - /** - * Wait for matching incoming event. Returns the event once it arrives in ProcessEvent method. - * @param predicate Predicate for waiting on event. - * @param timeout The timeout duration for the event to arrive. - * @return Returns the event once matching event arrives. - * @throws RuntimeException all checked exceptions if the logic fails. - */ - public Mono waitForEventProcessorAsync(Predicate predicate, - Duration timeout) { - // Initialize awaiter - EventAwaiterSingleTime eventAwaiterSingleTime = new EventAwaiterSingleTime(predicate); - - try { - // Queue it into the subscriber list. - eventAwaiters.add(eventAwaiterSingleTime); - - EventWithBacklogId eventWithBacklogId = eventBacklog.tryGetAndRemoveMatchedEvent(predicate); - - if (eventWithBacklogId == null) { - // If event comes to backlog later before the awaiter expires, ret will get that event, otherwise a timeout exception will throw. - Mono futureEventWithBacklogId - = eventAwaiterSingleTime.getEventWithBacklogId().timeout(timeout); - futureEventWithBacklogId.subscribe(event -> { - eventBacklog.removeEvent(event.getBackLogEventId()); - // Remove the awaiter since the event is found or the awaiter is expired. - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - }); - return futureEventWithBacklogId.map(EventWithBacklogId::getEvent); - } else { - // Remove the awaiter since the event is found or the awaiter is expired. - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - return Mono.just(eventWithBacklogId.getEvent()); - } - } catch (Exception e) { - if (!eventAwaiterSingleTime.isDisposed()) { - eventAwaiters.remove(eventAwaiterSingleTime); - eventAwaiterSingleTime.close(); - } - throw LOGGER.logExceptionAsError(new RuntimeException(e)); - } - } - - /** - * Attach Ongoing EventProcessor for specific event. - * @param callConnectionId The call connection id of the call. - * @param eventProcessor EventProcessor to be fired when the specified event arrives. - * @param eventType The event type that is being waited. - * @param Any CallAutomation events. - */ - public void attachOngoingEventProcessor(String callConnectionId, - Consumer eventProcessor, Class eventType) { - EventAwaiterOngoing eventAwaiterOngoing - = new EventAwaiterOngoing<>(eventType, callConnectionId, eventProcessor); - - try { - // Queue it into the subscriber list. - eventAwaiters.add(eventAwaiterOngoing); - ongoingEventAwaiters.put(new OngoingEventAwaiterKey<>(callConnectionId, eventType), eventAwaiterOngoing); - } catch (Exception e) { - if (!eventAwaiterOngoing.isDisposed()) { - OngoingEventAwaiterKey removalKey = ongoingEventAwaiters.searchKeys(1, key -> { - if (Objects.equals(key.getCallConnectionId(), callConnectionId) && key.getClazz() == eventType) { - return key; - } - return null; - }); - - if (removalKey != null) { - ongoingEventAwaiters.remove(removalKey); - eventAwaiters.remove(eventAwaiterOngoing); - } - } - } - } - - /** - * Detach Ongoing EventProcessor for specific event. - * @param callConnectionId The call connection id of the call. - * @param eventType The event type that is being waited. - * @param Any CallAutomation events. - */ - public void detachOngoingEventProcessor(String callConnectionId, - Class eventType) { - removeFromOngoingEvent(callConnectionId, eventType); - } - - private void removeFromOngoingEvent(String connectionId) { - removeFromOngoingEvent(connectionId, null); - } - - private void removeFromOngoingEvent(String connectionId, - Class clazz) { - if (clazz == null) { - // Remove all matching connectionId - List> keysToRemove = new ArrayList<>(); - ongoingEventAwaiters.forEachKey(1, key -> { - if (Objects.equals(key.getCallConnectionId(), connectionId)) { - keysToRemove.add(key); - } - }); - keysToRemove.forEach(key -> { - EventAwaiterOngoing awaiterOngoingToBeRemoved = ongoingEventAwaiters.remove(key); - eventAwaiters.remove(awaiterOngoingToBeRemoved); - }); - } else { - OngoingEventAwaiterKey removalKey = ongoingEventAwaiters.searchKeys(1, key -> { - if (Objects.equals(key.getCallConnectionId(), connectionId) && key.getClazz() == clazz) { - return key; - } - return null; - }); - - if (removalKey != null) { - EventAwaiterOngoing awaiterOngoingToBeRemoved = ongoingEventAwaiters.remove(removalKey); - eventAwaiters.remove(awaiterOngoingToBeRemoved); - } - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java index 895cebe280bc..c7409ab1b0c8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationServiceVersion.java @@ -11,8 +11,8 @@ public enum CallAutomationServiceVersion implements ServiceVersion { /** - * Service version {@code 2023-03-06}. - */ + * Service version {@code 2023-03-06}. + */ V2023_03_06("2023-03-06"), /** @@ -26,29 +26,14 @@ public enum CallAutomationServiceVersion implements ServiceVersion { V2024_04_15("2024-04-15"), /** - * Service version {@code 2024-09-15}. - */ - V2024_09_15("2024-09-15"), - - /** - * Service version {@code 2024-06-15-preview}. + * Service version {@code 2024-09-15}. */ - V2024_06_15_PREVIEW("2024-06-15-preview"), - - /** - * Service version {@code 2024-06-15-preview}. - */ - V2024_11_15_PREVIEW("2024-11-15-preview"), - - /** - * Service version {@code 2023-10-03-preview}. - */ - V2023_10_03_PREVIEW("2023-10-03-preview"), + V2024_09_15("2024-09-15"), /** - * Service version {@code 2024-2024-01-preview}. + * Service version {@code 2025-05-15}. */ - V2024_09_01_PREVIEW("2024-09-01-preview"); + V2025_05_15("2025-05-15"); private final String version; @@ -70,6 +55,6 @@ public String getVersion() { * @return The latest {@link CallAutomationServiceVersion} object. */ public static CallAutomationServiceVersion getLatest() { - return V2024_09_01_PREVIEW; + return V2025_05_15; } } 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 12c52e666dcb..d975bc9d99a6 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 @@ -16,8 +16,6 @@ import com.azure.communication.callautomation.models.RemoveParticipantResult; import com.azure.communication.callautomation.models.TransferCallResult; import com.azure.communication.callautomation.models.TransferCallToParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; import com.azure.communication.common.CommunicationIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; @@ -250,30 +248,6 @@ public Response muteParticipantWithResponse(MuteParticipa return callConnectionAsync.muteParticipantWithResponseInternal(options, context).block(); } - /** - * Unmutes participant in the call. - * - * @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported. - * @return An UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UnmuteParticipantResult unmuteParticipant(CommunicationIdentifier targetParticipant) { - return callConnectionAsync.unmuteParticipant(targetParticipant).block(); - } - - /** - * Unmutes participant in the call. - * - * @param options - Options for the request. - * @param context A {@link Context} representing the request context. - * @return a Response containing the UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response unmuteParticipantWithResponse(UnmuteParticipantOptions options, - Context context) { - return callConnectionAsync.unmuteParticipantWithResponseInternal(options, context).block(); - } - /** * Cancel add participant operation request. * @@ -314,16 +288,5 @@ public Response cancelAddParticipantOperati public CallMedia getCallMedia() { return new CallMedia(callConnectionAsync.getCallMediaAsync()); } - - /*** - * Returns an object of CallDialog - * - * @return a CallDialogAsync. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CallDialog getCallDialog() { - return new CallDialog(callConnectionAsync.getCallDialogAsync()); - } - //endregion } 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 ee9e25f2cb36..9426805497bb 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 @@ -4,7 +4,6 @@ package com.azure.communication.callautomation; import com.azure.communication.callautomation.implementation.CallConnectionsImpl; -import com.azure.communication.callautomation.implementation.CallDialogsImpl; import com.azure.communication.callautomation.implementation.CallMediasImpl; import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy; @@ -12,7 +11,6 @@ import com.azure.communication.callautomation.implementation.accesshelpers.MuteParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.accesshelpers.UnmuteParticipantsResponseConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CallParticipantConverter; import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter; @@ -22,7 +20,6 @@ import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal; import com.azure.communication.callautomation.implementation.models.RemoveParticipantRequestInternal; import com.azure.communication.callautomation.implementation.models.TransferToParticipantRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsRequestInternal; import com.azure.communication.callautomation.models.AddParticipantOptions; import com.azure.communication.callautomation.models.AddParticipantResult; import com.azure.communication.callautomation.models.CallConnectionProperties; @@ -36,8 +33,6 @@ import com.azure.communication.callautomation.models.RemoveParticipantResult; import com.azure.communication.callautomation.models.TransferCallResult; import com.azure.communication.callautomation.models.TransferCallToParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantOptions; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.common.MicrosoftTeamsAppIdentifier; @@ -70,17 +65,13 @@ public final class CallConnectionAsync { private final String callConnectionId; private final CallConnectionsImpl callConnectionInternal; private final CallMediasImpl callMediasInternal; - private final CallDialogsImpl callDialogsInternal; - private final CallAutomationEventProcessor eventProcessor; private final ClientLogger logger; CallConnectionAsync(String callConnectionId, CallConnectionsImpl callConnectionInternal, - CallMediasImpl contentsInternal, CallDialogsImpl dialogsInternal, CallAutomationEventProcessor eventProcessor) { + CallMediasImpl contentsInternal) { this.callConnectionId = callConnectionId; this.callConnectionInternal = callConnectionInternal; this.callMediasInternal = contentsInternal; - this.callDialogsInternal = dialogsInternal; - this.eventProcessor = eventProcessor; this.logger = new ClientLogger(CallConnectionAsync.class); } @@ -314,11 +305,8 @@ Mono> transferCallToParticipantWithResponseInternal } return callConnectionInternal.transferToParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - TransferCallResult result = TransferCallResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + TransferCallResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -380,11 +368,8 @@ Mono> addParticipantWithResponseInternal(AddParti } return callConnectionInternal.addParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - AddParticipantResult result = AddParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + AddParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -430,12 +415,8 @@ public Mono removeParticipant(CommunicationIdentifier p .setOperationCallbackUri(removeParticipantOptions.getOperationCallbackUrl()); return callConnectionInternal.removeParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - RemoveParticipantResult result - = RemoveParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + RemoveParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -481,45 +462,6 @@ Mono> muteParticipantWithResponseInternal(MutePa } } - /** - * Unmutes participant in the call. - * @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported. - * @return An UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteParticipant(CommunicationIdentifier targetParticipant) { - return unmuteParticipantWithResponseInternal(new UnmuteParticipantOptions(targetParticipant), null) - .flatMap(FluxUtil::toMono); - } - - /** - * Unmute participants in the call. - * @param unmuteParticipantOptions - Options for the request. - * @return a Response containing the UnmuteParticipantResult object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> - unmuteParticipantWithResponse(UnmuteParticipantOptions unmuteParticipantOptions) { - return withContext(context -> unmuteParticipantWithResponseInternal(unmuteParticipantOptions, context)); - } - - Mono> - unmuteParticipantWithResponseInternal(UnmuteParticipantOptions unmuteParticipantOptions, Context context) { - try { - context = context == null ? Context.NONE : context; - UnmuteParticipantsRequestInternal request = new UnmuteParticipantsRequestInternal() - .setTargetParticipants(Collections.singletonList( - CommunicationIdentifierConverter.convert(unmuteParticipantOptions.getTargetParticipant()))) - .setOperationContext(unmuteParticipantOptions.getOperationContext()); - - return callConnectionInternal.unmuteWithResponseAsync(callConnectionId, request, context) - .map(internalResponse -> new SimpleResponse<>(internalResponse, - UnmuteParticipantsResponseConstructorProxy.create(internalResponse.getValue()))); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - /** * Cancel add participant operation request. * @@ -560,12 +502,8 @@ Mono> cancelAddParticipantOperatio .setOperationCallbackUri(cancelAddParticipantOperationOptions.getOperationCallbackUrl()); return callConnectionInternal.cancelAddParticipantWithResponseAsync(callConnectionId, request, context) - .map(response -> { - CancelAddParticipantOperationResult result - = CancelAddParticipantResponseConstructorProxy.create(response.getValue()); - result.setEventProcessor(eventProcessor, callConnectionId, result.getOperationContext()); - return new SimpleResponse<>(response, result); - }); + .map(response -> new SimpleResponse<>(response, + CancelAddParticipantResponseConstructorProxy.create(response.getValue()))); } catch (RuntimeException ex) { return monoError(logger, ex); } @@ -581,15 +519,5 @@ Mono> cancelAddParticipantOperatio public CallMediaAsync getCallMediaAsync() { return new CallMediaAsync(callConnectionId, callMediasInternal); } - - /*** - * Returns an object of CallDialogAsync - * - * @return a CallDialogAsync. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CallDialogAsync getCallDialogAsync() { - return new CallDialogAsync(callConnectionId, callDialogsInternal); - } //endregion } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java deleted file mode 100644 index d0dee1bfa4db..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialog.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.core.util.Context; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.exception.HttpResponseException; -import com.azure.core.http.rest.Response; - -/** - * CallDialog. - */ -public final class CallDialog { - - /** - * Instance of CallDialogAsync. - */ - private final CallDialogAsync callDialogAsync; - - /** - * Constructor. - * - * @param callDialogAsync callDialogAsync - */ - CallDialog(CallDialogAsync callDialogAsync) { - this.callDialogAsync = callDialogAsync; - } - - /** - * Start Dialog - * - * @param options A {@link StartDialogOptions} object containing different options for startDialog. - * @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 Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DialogStateResult startDialog(StartDialogOptions options) { - return callDialogAsync.startDialog(options).block(); - } - - /** - * Start Dialog - * - * @param options A {@link StartDialogOptions} object containing different options for startDialog. - * @param context The context to associate with this operation. - * @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 Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response startDialogWithResponse(StartDialogOptions options, Context context) { - return callDialogAsync.startDialogWithResponseInternal(options, context).block(); - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @throws HttpResponseException 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 dialogId) { - callDialogAsync.stopDialog(dialogId).block(); - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @param context The context to associate with this operation. - * @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 Response for successful stopDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response stopDialogWithResponse(String dialogId, Context context) { - return callDialogAsync.stopDialogWithResponseInternal(dialogId, context).block(); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java deleted file mode 100644 index bdb493c54990..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallDialogAsync.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.implementation.CallDialogsImpl; -import com.azure.communication.callautomation.implementation.accesshelpers.DialogStateResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.BaseDialog; -import com.azure.communication.callautomation.implementation.models.StartDialogRequestInternal; -import com.azure.communication.callautomation.implementation.models.PowerVirtualAgentsDialog; -import com.azure.communication.callautomation.implementation.models.AzureOpenAIDialog; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -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.logging.ClientLogger; -import reactor.core.publisher.Mono; - -import static com.azure.core.util.FluxUtil.monoError; -import static com.azure.core.util.FluxUtil.withContext; - -/** - * CallDialogAsync. - */ -public final class CallDialogAsync { - - private final CallDialogsImpl dialogsInternal; - private final String callConnectionId; - private final ClientLogger logger; - - /** - * Constructor. - * - * @param callConnectionId callConnectionId the id of the call connection - * @param callDialogInternal Internal implementation of CallDialog - */ - CallDialogAsync(String callConnectionId, CallDialogsImpl callDialogInternal) { - this.callConnectionId = callConnectionId; - this.dialogsInternal = callDialogInternal; - this.logger = new ClientLogger(CallDialogAsync.class); - } - - /** - * Start Dialog - * - * @param startDialogOptions startDialog options - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono startDialog(StartDialogOptions startDialogOptions) { - return startDialogWithResponse(startDialogOptions).flatMap(response -> Mono.just(response.getValue())); - } - - /** - * Start Dialog - * - * @param startDialogOptions startDialog options - * @return Response for successful startDialog request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> startDialogWithResponse(StartDialogOptions startDialogOptions) { - return withContext(context -> startDialogWithResponseInternal(startDialogOptions, context)); - } - - @ServiceMethod(returns = ReturnType.SINGLE) - Mono> startDialogWithResponseInternal(StartDialogOptions startDialogOptions, - Context context) { - try { - context = context == null ? Context.NONE : context; - - BaseDialog baseDialog = null; - if (startDialogOptions.getDialogInputType() == DialogInputType.POWER_VIRTUAL_AGENTS) { - baseDialog = new PowerVirtualAgentsDialog().setBotAppId(startDialogOptions.getBotId()) - .setContext(startDialogOptions.getDialogContext()); - } else if (startDialogOptions.getDialogInputType() == DialogInputType.AZURE_OPEN_AI) { - baseDialog = new AzureOpenAIDialog().setContext(startDialogOptions.getDialogContext()); - } - - StartDialogRequestInternal requestInternal = new StartDialogRequestInternal().setDialog(baseDialog) - .setOperationContext(startDialogOptions.getOperationContext()); - - return dialogsInternal - .startDialogWithResponseAsync(callConnectionId, startDialogOptions.getDialogId(), requestInternal, - context) - .map(response -> new SimpleResponse<>(response, - DialogStateResponseConstructorProxy.create(response.getValue()))); - } catch (RuntimeException e) { - return monoError(logger, e); - } - } - - /** - * Stop Dialog - * - * @param dialogId The dialog id. - * @return Response for successful stopDialog request. - */ - public Mono stopDialog(String dialogId) { - return stopDialogWithResponse(dialogId).then(); - } - - /** - * Sop Dialog - * - * @param dialogId The dialog id. - * @return Response for successful stopDialog request. - */ - public Mono> stopDialogWithResponse(String dialogId) { - return withContext(context -> stopDialogWithResponseInternal(dialogId, context)); - } - - Mono> stopDialogWithResponseInternal(String dialogId, Context context) { - try { - context = context == null ? Context.NONE : context; - // TODO: FIX OperationCallbackUri - return dialogsInternal.stopDialogWithResponseAsync(callConnectionId, dialogId, null, context); - } catch (RuntimeException e) { - return monoError(logger, e); - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java index 1f9a853b6ddb..f988acde11dc 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java @@ -3,13 +3,14 @@ package com.azure.communication.callautomation; +import java.util.List; + import com.azure.communication.callautomation.models.CallMediaRecognizeOptions; import com.azure.communication.callautomation.models.ContinuousDtmfRecognitionOptions; import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; -import com.azure.communication.callautomation.models.UnholdOptions; import com.azure.communication.callautomation.models.PlayOptions; +import com.azure.communication.callautomation.models.PlaySource; import com.azure.communication.callautomation.models.PlayToAllOptions; import com.azure.communication.callautomation.models.SendDtmfTonesOptions; import com.azure.communication.callautomation.models.SendDtmfTonesResult; @@ -17,15 +18,14 @@ import com.azure.communication.callautomation.models.StartTranscriptionOptions; import com.azure.communication.callautomation.models.StopMediaStreamingOptions; import com.azure.communication.callautomation.models.StopTranscriptionOptions; -import com.azure.communication.callautomation.models.PlaySource; +import com.azure.communication.callautomation.models.UnholdOptions; +import com.azure.communication.callautomation.models.UpdateTranscriptionOptions; import com.azure.communication.common.CommunicationIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.HttpResponseException; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.core.exception.HttpResponseException; - -import java.util.List; /** * CallContent. @@ -322,30 +322,13 @@ public void updateTranscription(String locale) { /** * Updates transcription language in the call. - * @param locale Defines new locale for transcription. - * @param speechRecognitionModelEndpointId Defines custom model endpoint. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateTranscription(String locale, String speechRecognitionModelEndpointId) { - callMediaAsync.updateTranscription(locale, speechRecognitionModelEndpointId).block(); - } - - /** - * Updates transcription language in the call. - * - * @param locale Defines new locale for transcription. - * @param speechRecognitionModelEndpointId Defines custom model endpoint. + *@param options Options for the Update Transcription operation. * @param context Context - * @param operationContext operational context. * @return Response for successful update transcription request. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTranscriptionWithResponse(String locale, String speechRecognitionModelEndpointId, - String operationContext, Context context) { - return callMediaAsync - .updateTranscriptionWithResponseInternal(locale, speechRecognitionModelEndpointId, operationContext, - context) - .block(); + public Response updateTranscriptionWithResponse(UpdateTranscriptionOptions options, Context context) { + return callMediaAsync.updateTranscriptionWithResponseInternal(options, context).block(); } /** @@ -387,26 +370,4 @@ public void stopMediaStreaming() { public Response stopMediaStreamingWithResponse(StopMediaStreamingOptions options, Context context) { return callMediaAsync.stopMediaStreamingWithResponseInternal(options, context).block(); } - - /** - * Interrupt audio and play announment to the participant in call. - * @param playSource A {@link PlaySource} representing the source to play. - * @param playTo the target. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void interruptAudioAndAnnounce(PlaySource playSource, CommunicationIdentifier playTo) { - callMediaAsync.interruptAudioAndAnnounce(playSource, playTo).block(); - } - - /** - * Interrupt audio and play announment to the participant in call. - * @param options - Different options to pass to the request. - * @param context Context - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response interruptAudioAndAnnounceWithResponse(InterruptAudioAndAnnounceOptions options, - Context context) { - return callMediaAsync.interruptAudioAndAnnounceWithResponseInternal(options, context).block(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java index 2a367f66f2fe..82a07eee4b96 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java @@ -16,7 +16,6 @@ import com.azure.communication.callautomation.implementation.models.DtmfToneInternal; import com.azure.communication.callautomation.implementation.models.FileSourceInternal; import com.azure.communication.callautomation.implementation.models.HoldRequest; -import com.azure.communication.callautomation.implementation.models.InterruptAudioAndAnnounceRequest; import com.azure.communication.callautomation.implementation.models.PlayOptionsInternal; import com.azure.communication.callautomation.implementation.models.PlayRequest; import com.azure.communication.callautomation.implementation.models.PlaySourceInternal; @@ -45,7 +44,6 @@ import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.FileSource; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.PlaySource; import com.azure.communication.callautomation.models.PlayToAllOptions; @@ -59,6 +57,7 @@ import com.azure.communication.callautomation.models.StopTranscriptionOptions; import com.azure.communication.callautomation.models.TextSource; import com.azure.communication.callautomation.models.UnholdOptions; +import com.azure.communication.callautomation.models.UpdateTranscriptionOptions; import com.azure.communication.common.CommunicationIdentifier; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; @@ -303,7 +302,6 @@ PlayRequest getPlayRequest(PlayOptions options) { request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop())); request.setOperationContext(options.getOperationContext()); request.setOperationCallbackUri(options.getOperationCallbackUrl()); - request.setPlayOptions(new PlayOptionsInternal().setInterruptHoldAudio(options.isInterruptHoldAudio())); return request; } @@ -333,8 +331,8 @@ PlayRequest getPlayToAllRequest(PlayToAllOptions options) { if (!playSourcesInternal.isEmpty()) { PlayRequest request = new PlayRequest().setPlaySources(playSourcesInternal); - request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop()) - .setInterruptCallMediaOperation(options.isInterruptCallMediaOperation())); + request.setPlayOptions(new PlayOptionsInternal().setLoop(options.isLoop())); + request.setInterruptCallMediaOperation(options.isInterruptCallMediaOperation()); request.setOperationContext(options.getOperationContext()); request.setOperationCallbackUri(options.getOperationCallbackUrl()); @@ -804,7 +802,8 @@ Mono> unholdWithResponseInternal(UnholdOptions options, Context c context = context == null ? Context.NONE : context; UnholdRequest request = new UnholdRequest() .setTargetParticipant(CommunicationIdentifierConverter.convert(options.getTargetParticipant())) - .setOperationContext(options.getOperationContext()); + .setOperationContext(options.getOperationContext()) + .setOperationCallbackUri(options.getOperationCallbackUrl()); return contentsInternal.unholdWithResponseAsync(callConnectionId, request, context); } catch (RuntimeException ex) { @@ -883,61 +882,33 @@ Mono> stopTranscriptionWithResponseInternal(StopTranscriptionOpti } /** - * Updates transcription language + * API to change transcription language * * @param locale Defines new locale for transcription. * @return Response for successful operation. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateTranscription(String locale) { - return updateTranscriptionWithResponse(locale, null, null).then(); + return updateTranscriptionWithResponse(new UpdateTranscriptionOptions().setLocale(locale)).then(); } /** - * Updates transcription language - * - * @param locale Defines new locale for transcription. - * @param speechRecognitionModelEndpointId Defines custom model endpoint. - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTranscription(String locale, String speechRecognitionModelEndpointId) { - return updateTranscriptionWithResponse(locale, speechRecognitionModelEndpointId, null).then(); - } - - /** - * Updates transcription language - * @param speechRecognitionModelEndpointId Defines custom model endpoint. - * @param locale Defines new locale for transcription. - * @param operationContext operational context. + * API to change transcription language + * @param options Options for the Update Transcription operation. * @return Response for successful operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTranscriptionWithResponse(String locale, String speechRecognitionModelEndpointId, - String operationContext) { - return withContext(context -> updateTranscriptionWithResponseInternal(locale, speechRecognitionModelEndpointId, - operationContext, context)); + public Mono> updateTranscriptionWithResponse(UpdateTranscriptionOptions options) { + return withContext(context -> updateTranscriptionWithResponseInternal(options, context)); } - Mono> updateTranscriptionWithResponseInternal(String locale, Context context) { + Mono> updateTranscriptionWithResponseInternal(UpdateTranscriptionOptions options, Context context) { try { context = context == null ? Context.NONE : context; UpdateTranscriptionRequestInternal request = new UpdateTranscriptionRequestInternal(); - request.setLocale(locale); - return contentsInternal.updateTranscriptionWithResponseAsync(callConnectionId, request, context); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - - Mono> updateTranscriptionWithResponseInternal(String locale, String speechRecognitionModelEndpointId, - String operationContext, Context context) { - try { - context = context == null ? Context.NONE : context; - UpdateTranscriptionRequestInternal request = new UpdateTranscriptionRequestInternal(); - request.setLocale(locale); - request.setSpeechModelEndpointId(speechRecognitionModelEndpointId); - request.setOperationContext(operationContext); + request.setLocale(options.getLocale()); + request.setSpeechModelEndpointId(options.getSpeechRecognitionModelEndpointId()); + request.setOperationContext(options.getOperationContext()); return contentsInternal.updateTranscriptionWithResponseAsync(callConnectionId, request, context); } catch (RuntimeException ex) { return monoError(logger, ex); @@ -1012,50 +983,4 @@ Mono> stopMediaStreamingWithResponseInternal(StopMediaStreamingOp return monoError(logger, ex); } } - - /** - * Interrupt audio and play announment to the participant in call. - * @param playTo the target. - * @param playSource the play source. - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounce(PlaySource playSource, CommunicationIdentifier playTo) { - return interruptAudioAndAnnounceWithResponse(new InterruptAudioAndAnnounceOptions(playSource, playTo)) - .flatMap(FluxUtil::toMono); - } - - /** - * Interrupt audio and play announment to the participant in call. - * @param options - Different options to pass to the request. - * @return Response for successful operation. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponse(InterruptAudioAndAnnounceOptions options) { - return withContext(context -> interruptAudioAndAnnounceWithResponseInternal(options, context)); - } - - Mono> interruptAudioAndAnnounceWithResponseInternal(InterruptAudioAndAnnounceOptions options, - Context context) { - try { - context = context == null ? Context.NONE : context; - List playSourcesInternal = new ArrayList<>(); - InterruptAudioAndAnnounceRequest request = new InterruptAudioAndAnnounceRequest() - .setPlayTo(CommunicationIdentifierConverter.convert(options.getPlayTo())) - .setOperationContext(options.getOperationContext()); - - if (options.getPlaySources() != null) { - for (PlaySource playSource : options.getPlaySources()) { - if (playSource != null) { - playSourcesInternal.add(convertPlaySourceToPlaySourceInternal(playSource)); - } - } - } - request.setPlaySources(playSourcesInternal); - - return contentsInternal.interruptAudioAndAnnounceWithResponseAsync(callConnectionId, request, context); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecording.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecording.java index f958e7887037..259be49f3441 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecording.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallRecording.java @@ -19,8 +19,6 @@ import java.security.InvalidParameterException; import java.util.Objects; -import com.azure.communication.callautomation.models.RecordingResult; - /** * CallRecording. */ @@ -165,33 +163,6 @@ public Response getStateWithResponse(String recordingId, C return callRecordingAsync.getStateWithResponseInternal(recordingId, context).block(); } - /** - * Get the recording result by recording id. - * - * @param recordingId The recording id to stop. - * @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 Response for a successful get recording state request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecordingResult getRecordingResult(String recordingId) { - return callRecordingAsync.getRecordingResult(recordingId).block(); - } - - /** - * Get the recording result by recording id. - * - * @param recordingId The recording id to stop. - * @param context A {@link Context} representing the request context. - * @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 Response for a successful get recording state request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRecordingResult(String recordingId, Context context) { - return callRecordingAsync.getRecordingResultResponseInternal(recordingId, context).block(); - } - /** * Download the recording content, e.g. Recording's metadata, Recording video, etc., from * {@code endpoint} and write it in the {@link OutputStream} passed as parameter. 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 4eeb2973b1c3..e9a0d4672ceb 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 @@ -20,7 +20,6 @@ import java.util.stream.Collectors; import com.azure.communication.callautomation.implementation.CallRecordingsImpl; -import com.azure.communication.callautomation.implementation.accesshelpers.RecordingResultResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.RecordingStateResponseConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; import com.azure.communication.callautomation.implementation.models.CallLocatorInternal; @@ -40,7 +39,6 @@ import com.azure.communication.callautomation.models.DownloadToFileOptions; import com.azure.communication.callautomation.models.GroupCallLocator; import com.azure.communication.callautomation.models.ParallelDownloadOptions; -import com.azure.communication.callautomation.models.RecordingResult; import com.azure.communication.callautomation.models.RecordingStateResult; import com.azure.communication.callautomation.models.RoomCallLocator; import com.azure.communication.callautomation.models.ServerCallLocator; @@ -188,9 +186,6 @@ private StartCallRecordingRequestInternal getStartCallRecordingRequest(StartReco if (options.isPauseOnStart() != null) { request.setPauseOnStart(options.isPauseOnStart()); } - if (options.getCallConnectionId() != null) { - request.setCallConnectionId(options.getCallConnectionId()); - } return request; } @@ -344,45 +339,6 @@ Mono> getStateWithResponseInternal(String recordi } } - /** - * Get recording result by recording id. - * - * @param recordingId Recording id to stop. - * @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 Response for a successful get recording state request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRecordingResult(String recordingId) { - return getRecordingResultResponse(recordingId).flatMap(response -> Mono.just(response.getValue())); - } - - /** - * Get recording result by recording id. - * - * @param recordingId Recording id to stop. - * @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 Response for a successful get recording state request. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRecordingResultResponse(String recordingId) { - return getRecordingResultResponseInternal(recordingId, null); - } - - Mono> getRecordingResultResponseInternal(String recordingId, Context context) { - try { - return withContext(contextValue -> { - contextValue = context == null ? contextValue : context; - return callRecordingsInternal.getRecordingResultWithResponseAsync(recordingId, contextValue) - .map(response -> new SimpleResponse<>(response, - RecordingResultResponseConstructorProxy.create(response.getValue()))); - }); - } catch (RuntimeException ex) { - return monoError(logger, ex); - } - } - /** * Download the recording content, e.g. Recording's metadata, Recording video, from the ACS endpoint * passed as parameter. 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 6660a35c4648..1ff31f5c9527 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 @@ -130,20 +130,6 @@ 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. */ @@ -196,7 +182,6 @@ 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(AzureCommunicationCallAutomationServiceService.class, this.httpPipeline, this.getSerializerAdapter()); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java index 099792f966c9..27901c896aa5 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/AzureCommunicationCallAutomationServiceImplBuilder.java @@ -275,7 +275,7 @@ public AzureCommunicationCallAutomationServiceImplBuilder retryPolicy(RetryPolic public AzureCommunicationCallAutomationServiceImpl buildClient() { this.validateClient(); HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); - String localApiVersion = (apiVersion != null) ? apiVersion : "2024-09-01-preview"; + String localApiVersion = (apiVersion != null) ? apiVersion : "2025-05-15"; SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); AzureCommunicationCallAutomationServiceImpl client = new AzureCommunicationCallAutomationServiceImpl( 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 b662165e686e..2d12c1a429e7 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 @@ -12,16 +12,12 @@ import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse; import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; import com.azure.communication.callautomation.implementation.models.GetParticipantsResponseInternal; -import com.azure.communication.callautomation.implementation.models.MoveParticipantsRequest; -import com.azure.communication.callautomation.implementation.models.MoveParticipantsResponse; import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal; import com.azure.communication.callautomation.implementation.models.MuteParticipantsResultInternal; import com.azure.communication.callautomation.implementation.models.RemoveParticipantRequestInternal; import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal; import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal; import com.azure.communication.callautomation.implementation.models.TransferToParticipantRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsRequestInternal; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsResponseInternal; import com.azure.core.annotation.BodyParam; import com.azure.core.annotation.Delete; import com.azure.core.annotation.ExpectedResponses; @@ -151,16 +147,6 @@ Mono> mute(@HostParam("endpoint") Strin @HeaderParam("repeatability-request-id") String repeatabilityRequestId, @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}/participants:unmute") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> unmute(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UnmuteParticipantsRequestInternal unmuteParticipantsRequest, - @HeaderParam("Accept") String accept, - @HeaderParam("repeatability-request-id") String repeatabilityRequestId, - @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}/participants:cancelAddParticipant") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -171,16 +157,6 @@ Mono> cancelAddParticipant(@HostParam("en @HeaderParam("repeatability-request-id") String repeatabilityRequestId, @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}/participants:moveHere") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> moveParticipants(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") MoveParticipantsRequest moveParticipantRequest, - @HeaderParam("Accept") String accept, - @HeaderParam("repeatability-request-id") String repeatabilityRequestId, - @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Get("/calling/callConnections/{callConnectionId}/participants/{participantRawId}") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -711,7 +687,7 @@ public PagedIterable getParticipants(String callConnect * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -729,7 +705,7 @@ public Mono> addParticipantWithResponse * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -750,7 +726,7 @@ public Mono> addParticipantWithResponse * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -767,7 +743,7 @@ public Mono addParticipantAsync(String callConne * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -785,7 +761,7 @@ public Mono addParticipantAsync(String callConne * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -802,7 +778,7 @@ public Response addParticipantWithResponse(Strin * Add a participant to the call. * * @param callConnectionId The call connection Id. - * @param addParticipantRequest The add participants request. + * @param addParticipantRequest The addParticipantRequest 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. @@ -1028,113 +1004,6 @@ public MuteParticipantsResultInternal mute(String callConnectionId, return muteWithResponse(callConnectionId, muteParticipantsRequest, Context.NONE).getValue(); } - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unmuteWithResponseAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - return FluxUtil - .withContext(context -> unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest, context)); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> unmuteWithResponseAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - final String accept = "application/json"; - return service.unmute(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - unmuteParticipantsRequest, accept, CoreUtils.randomUuid().toString(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), context); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono unmuteAsync(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response unmuteWithResponse(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest, Context context) { - return unmuteWithResponseAsync(callConnectionId, unmuteParticipantsRequest, context).block(); - } - - /** - * Unmute participants from the call using identifier. - * - * @param callConnectionId The call connection id. - * @param unmuteParticipantsRequest The participants to be unmuted from the call. - * @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 unmuting participants from the call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public UnmuteParticipantsResponseInternal unmute(String callConnectionId, - UnmuteParticipantsRequestInternal unmuteParticipantsRequest) { - return unmuteWithResponse(callConnectionId, unmuteParticipantsRequest, Context.NONE).getValue(); - } - /** * Cancel add participant operation. * @@ -1242,113 +1111,6 @@ public CancelAddParticipantResponse cancelAddParticipant(String callConnectionId return cancelAddParticipantWithResponse(callConnectionId, cancelAddParticipantRequest, Context.NONE).getValue(); } - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> moveParticipantsWithResponseAsync(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest) { - return FluxUtil.withContext( - context -> moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context)); - } - - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> moveParticipantsWithResponseAsync(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest, Context context) { - final String accept = "application/json"; - return service.moveParticipants(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - moveParticipantRequest, accept, CoreUtils.randomUuid().toString(), - DateTimeRfc1123.toRfc1123String(OffsetDateTime.now()), context); - } - - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono moveParticipantsAsync(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest) { - return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono moveParticipantsAsync(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest, Context context) { - return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response moveParticipantsWithResponse(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest, Context context) { - return moveParticipantsWithResponseAsync(callConnectionId, moveParticipantRequest, context).block(); - } - - /** - * Add a participant to the call. - * - * @param callConnectionId The call connection Id. - * @param moveParticipantRequest The move participants 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 payload for moving participants to the call. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public MoveParticipantsResponse moveParticipants(String callConnectionId, - MoveParticipantsRequest moveParticipantRequest) { - return moveParticipantsWithResponse(callConnectionId, moveParticipantRequest, Context.NONE).getValue(); - } - /** * Get participant from a call. * 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 index 1348418d38ef..62ca65b81715 100644 --- 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 @@ -58,7 +58,7 @@ public final class CallDialogsImpl { * proxy service to perform REST calls. */ @Host("{endpoint}") - @ServiceInterface(name = "AzureCommunicationCallAutomationServiceCallDialogs") + @ServiceInterface(name = "AzureCommunicationCa") public interface CallDialogsService { @Put("/calling/callConnections/{callConnectionId}/dialogs/{dialogId}") @ExpectedResponses({ 201 }) @@ -103,8 +103,9 @@ Mono> updateDialog(@HostParam("endpoint") String endpoint, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> startDialogWithResponseAsync(String callConnectionId, String dialogId, StartDialogRequestInternal startDialogRequest) { - return FluxUtil.withContext( - context -> startDialogWithResponseAsync(callConnectionId, dialogId, startDialogRequest, context)); + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.startDialog(this.client.getEndpoint(), callConnectionId, + dialogId, this.client.getApiVersion(), startDialogRequest, accept, context)); } /** @@ -223,8 +224,9 @@ public DialogStateResponse startDialog(String callConnectionId, String dialogId, @ServiceMethod(returns = ReturnType.SINGLE) public Mono> stopDialogWithResponseAsync(String callConnectionId, String dialogId, String operationCallbackUri) { - return FluxUtil.withContext( - context -> stopDialogWithResponseAsync(callConnectionId, dialogId, operationCallbackUri, context)); + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.stopDialog(this.client.getEndpoint(), callConnectionId, dialogId, + operationCallbackUri, this.client.getApiVersion(), accept, context)); } /** @@ -332,8 +334,9 @@ public void stopDialog(String callConnectionId, String dialogId, String operatio @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateDialogWithResponseAsync(String callConnectionId, String dialogId, UpdateDialogRequest updateDialogRequest) { - return FluxUtil.withContext( - context -> updateDialogWithResponseAsync(callConnectionId, dialogId, updateDialogRequest, context)); + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.updateDialog(this.client.getEndpoint(), callConnectionId, + dialogId, this.client.getApiVersion(), updateDialogRequest, accept, context)); } /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java index fac736509748..0df615d940a4 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java @@ -7,7 +7,6 @@ import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; import com.azure.communication.callautomation.implementation.models.ContinuousDtmfRecognitionRequestInternal; import com.azure.communication.callautomation.implementation.models.HoldRequest; -import com.azure.communication.callautomation.implementation.models.InterruptAudioAndAnnounceRequest; import com.azure.communication.callautomation.implementation.models.PlayRequest; import com.azure.communication.callautomation.implementation.models.RecognizeRequest; import com.azure.communication.callautomation.implementation.models.SendDtmfTonesRequestInternal; @@ -95,6 +94,14 @@ Mono> stopTranscription(@HostParam("endpoint") String endpoint, @BodyParam("application/json") StopTranscriptionRequestInternal stopTranscriptionRequest, @HeaderParam("Accept") String accept, Context context); + @Post("/calling/callConnections/{callConnectionId}:updateTranscription") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) + Mono> updateTranscription(@HostParam("endpoint") String endpoint, + @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") UpdateTranscriptionRequestInternal updateTranscriptionRequest, + @HeaderParam("Accept") String accept, Context context); + @Post("/calling/callConnections/{callConnectionId}:cancelAllMediaOperations") @ExpectedResponses({ 202 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -136,14 +143,6 @@ Mono> sendDtmfTones(@HostParam("endpoint") @HeaderParam("repeatability-request-id") String repeatabilityRequestId, @HeaderParam("repeatability-first-sent") String repeatabilityFirstSent, Context context); - @Post("/calling/callConnections/{callConnectionId}:updateTranscription") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> updateTranscription(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") UpdateTranscriptionRequestInternal updateTranscriptionRequest, - @HeaderParam("Accept") String accept, Context context); - @Post("/calling/callConnections/{callConnectionId}:hold") @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) @@ -175,14 +174,6 @@ Mono> stopMediaStreaming(@HostParam("endpoint") String endpoint, @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") StopMediaStreamingRequest stopMediaStreamingRequest, @HeaderParam("Accept") String accept, Context context); - - @Post("/calling/callConnections/{callConnectionId}:interruptAudioAndAnnounce") - @ExpectedResponses({ 202 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> interruptAudioAndAnnounce(@HostParam("endpoint") String endpoint, - @PathParam("callConnectionId") String callConnectionId, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") InterruptAudioAndAnnounceRequest interruptRequest, - @HeaderParam("Accept") String accept, Context context); } /** @@ -485,6 +476,121 @@ public void stopTranscription(String callConnectionId, StopTranscriptionRequestI stopTranscriptionWithResponse(callConnectionId, stopTranscriptionRequest, Context.NONE); } + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + return FluxUtil.withContext( + context -> updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context)); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + final String accept = "application/json"; + return service.updateTranscription(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), + updateTranscriptionRequest, accept, context); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTranscriptionAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest) + .flatMap(ignored -> Mono.empty()); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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 A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono updateTranscriptionAsync(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context) + .flatMap(ignored -> Mono.empty()); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateTranscriptionWithResponse(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { + return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context).block(); + } + + /** + * UpdateTranscription Api. + * + * API to change transcription language. + * + * @param callConnectionId The call connection id. + * @param updateTranscriptionRequest The UpdateTranscription 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void updateTranscription(String callConnectionId, + UpdateTranscriptionRequestInternal updateTranscriptionRequest) { + updateTranscriptionWithResponse(callConnectionId, updateTranscriptionRequest, Context.NONE); + } + /** * Cancel all media operations in a call. * @@ -982,121 +1088,6 @@ public SendDtmfTonesResultInternal sendDtmfTones(String callConnectionId, return sendDtmfTonesWithResponse(callConnectionId, sendDtmfTonesRequest, Context.NONE).getValue(); } - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - return FluxUtil.withContext( - context -> updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context)); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> updateTranscriptionWithResponseAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - final String accept = "application/json"; - return service.updateTranscription(this.client.getEndpoint(), callConnectionId, this.client.getApiVersion(), - updateTranscriptionRequest, accept, context); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTranscriptionAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest) - .flatMap(ignored -> Mono.empty()); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono updateTranscriptionAsync(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTranscriptionWithResponse(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest, Context context) { - return updateTranscriptionWithResponseAsync(callConnectionId, updateTranscriptionRequest, context).block(); - } - - /** - * UpdateTranscription Api. - * - * API to change transcription language. - * - * @param callConnectionId The call connection id. - * @param updateTranscriptionRequest The UpdateTranscription 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void updateTranscription(String callConnectionId, - UpdateTranscriptionRequestInternal updateTranscriptionRequest) { - updateTranscriptionWithResponse(callConnectionId, updateTranscriptionRequest, Context.NONE); - } - /** * Hold participant from the call using identifier. * @@ -1514,106 +1505,4 @@ public Response stopMediaStreamingWithResponse(String callConnectionId, public void stopMediaStreaming(String callConnectionId, StopMediaStreamingRequest stopMediaStreamingRequest) { stopMediaStreamingWithResponse(callConnectionId, stopMediaStreamingRequest, Context.NONE); } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponseAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest) { - return FluxUtil.withContext( - context -> interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest, context)); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> interruptAudioAndAnnounceWithResponseAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - final String accept = "application/json"; - return service.interruptAudioAndAnnounce(this.client.getEndpoint(), callConnectionId, - this.client.getApiVersion(), interruptRequest, accept, context); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounceAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono interruptAudioAndAnnounceAsync(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest, context) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response interruptAudioAndAnnounceWithResponse(String callConnectionId, - InterruptAudioAndAnnounceRequest interruptRequest, Context context) { - return interruptAudioAndAnnounceWithResponseAsync(callConnectionId, interruptRequest, context).block(); - } - - /** - * Plays audio to participants in the call. - * - * @param callConnectionId The call connection id. - * @param interruptRequest play request payload. - * @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 interruptAudioAndAnnounce(String callConnectionId, InterruptAudioAndAnnounceRequest interruptRequest) { - interruptAudioAndAnnounceWithResponse(callConnectionId, interruptRequest, Context.NONE); - } } 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 2dca24c6faf7..454555930fa1 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 @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation; import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException; -import com.azure.communication.callautomation.implementation.models.RecordingResultResponse; import com.azure.communication.callautomation.implementation.models.RecordingStateResponseInternal; import com.azure.communication.callautomation.implementation.models.StartCallRecordingRequestInternal; import com.azure.core.annotation.BodyParam; @@ -64,7 +63,7 @@ public final class CallRecordingsImpl { @ServiceInterface(name = "AzureCommunicationCallAutomationServiceCallRecordings") public interface CallRecordingsService { @Post("/calling/recordings") - @ExpectedResponses({ 200, 202 }) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) Mono> startRecording(@HostParam("endpoint") String endpoint, @QueryParam("api-version") String apiVersion, @@ -100,13 +99,6 @@ Mono> pauseRecording(@HostParam("endpoint") String endpoint, Mono> resumeRecording(@HostParam("endpoint") String endpoint, @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Get("/calling/recordings/{recordingId}/result") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class) - Mono> getRecordingResult(@HostParam("endpoint") String endpoint, - @PathParam("recordingId") String recordingId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); } /** @@ -559,95 +551,4 @@ public Response resumeRecordingWithResponse(String recordingId, Context co public void resumeRecording(String recordingId) { resumeRecordingWithResponse(recordingId, Context.NONE); } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRecordingResultWithResponseAsync(String recordingId) { - return FluxUtil.withContext(context -> getRecordingResultWithResponseAsync(recordingId, context)); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono> getRecordingResultWithResponseAsync(String recordingId, - Context context) { - final String accept = "application/json"; - return service.getRecordingResult(this.client.getEndpoint(), recordingId, this.client.getApiVersion(), accept, - context); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRecordingResultAsync(String recordingId) { - return getRecordingResultWithResponseAsync(recordingId).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono getRecordingResultAsync(String recordingId, Context context) { - return getRecordingResultWithResponseAsync(recordingId, context) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRecordingResultWithResponse(String recordingId, Context context) { - return getRecordingResultWithResponseAsync(recordingId, context).block(); - } - - /** - * Get recording result. This includes the download URLs for the recording chunks. - * - * @param recordingId The recording 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 recording result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RecordingResultResponse getRecordingResult(String recordingId) { - return getRecordingResultWithResponse(recordingId, Context.NONE).getValue(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioDataContructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioDataContructorProxy.java index 33d881c1d76f..507377cfa7fb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioDataContructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioDataContructorProxy.java @@ -5,11 +5,15 @@ import com.azure.communication.callautomation.implementation.converters.AudioDataConverter; import com.azure.communication.callautomation.models.AudioData; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link AudioData} across package boundaries. */ public final class AudioDataContructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(AudioDataContructorProxy.class); + private static AudioDataContructorProxyAccessor accessor; private AudioDataContructorProxy() { @@ -35,7 +39,7 @@ public interface AudioDataContructorProxyAccessor { * @param data The internal response. * @return A new instance of {@link AudioData}. */ - AudioData create(byte[] data); + AudioData create(BinaryData data); } /** @@ -59,7 +63,11 @@ public static AudioData create(AudioDataConverter internalResponse) { // application accesses AudioData 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 AudioData(); + try { + Class.forName(AudioData.class.getName(), true, AudioDataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; @@ -72,12 +80,16 @@ public static AudioData create(AudioDataConverter internalResponse) { * @param data The audio data. * @return A new instance of {@link AudioData}. */ - public static AudioData create(byte[] data) { + public static AudioData create(BinaryData data) { // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the // application accesses AudioData 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 AudioData(); + try { + Class.forName(AudioData.class.getName(), true, AudioDataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioMetadataContructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioMetadataContructorProxy.java index 3e44104475e1..5386f652c307 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioMetadataContructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/AudioMetadataContructorProxy.java @@ -5,11 +5,13 @@ import com.azure.communication.callautomation.implementation.converters.AudioMetadataConverter; import com.azure.communication.callautomation.models.AudioMetadata; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link AudioMetaData} across package boundaries. */ public final class AudioMetadataContructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(AudioMetadataContructorProxy.class); private static AudioMetadataContructorProxyAccessor accessor; private AudioMetadataContructorProxy() { @@ -51,7 +53,12 @@ public static AudioMetadata create(AudioMetadataConverter internalResponse) { // application accesses AudioMetadata 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 AudioMetadata(); + try { + Class.forName(AudioMetadata.class.getName(), true, + AudioMetadataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java deleted file mode 100644 index 82bb62ff8d49..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DialogStateResponseConstructorProxy.java +++ /dev/null @@ -1,61 +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.DialogStateResponse; -import com.azure.communication.callautomation.models.DialogStateResult; - -/** - * Helper class to access private values of {@link DialogStateResult} across package boundaries. - */ -public final class DialogStateResponseConstructorProxy { - private static DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor accessor; - - private DialogStateResponseConstructorProxy() { - } - - /** - * Type defining the methods to set the non-public properties of a {@link DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor} - * instance. - */ - public interface DialogStateResponseConstructorAccessor { - /** - * Creates a new instance of {@link DialogStateResult} backed by an internal instance of - * {@link DialogStateResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link DialogStateResult}. - */ - DialogStateResult create(DialogStateResponse internalResponse); - } - - /** - * The method called from {@link DialogStateResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void - setAccessor(final DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor accessor) { - DialogStateResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link DialogStateResult} backed by an internal instance of - * {@link DialogStateResult}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link DialogStateResult}. - */ - public static DialogStateResult create(DialogStateResponse 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 DialogStateResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DtmfDataContructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DtmfDataContructorProxy.java new file mode 100644 index 000000000000..64932060a695 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/DtmfDataContructorProxy.java @@ -0,0 +1,96 @@ +// 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.converters.DtmfDataConverter; +import com.azure.communication.callautomation.models.DtmfData; +import com.azure.core.util.logging.ClientLogger; + +/** + * Helper class to access private values of {@link DtmdfData} across package boundaries. + */ +public final class DtmfDataContructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(DtmfDataContructorProxy.class); + private static DtmfDataContructorProxyAccessor accessor; + + private DtmfDataContructorProxy() { + } + + /** + * Type defining the methods to set the non-public properties of a {@link DtmfDataContructorProxyAccessor} + * instance. + */ + public interface DtmfDataContructorProxyAccessor { + /** + * Creates a new instance of {@link DtmfData} backed by an internal instance of + * {@link DtmfDataConvertor}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link DtmfData}. + */ + DtmfData create(DtmfDataConverter internalResponse); + + /** + * Creates a new instance of {@link DtmfData} + * + * @param data The internal response. + * @return A new instance of {@link DtmfData}. + */ + DtmfData create(String data); + } + + /** + * The method called from {@link DtmfData} to set it's accessor. + * + * @param accessor The accessor. + */ + public static void setAccessor(final DtmfDataContructorProxyAccessor accessor) { + DtmfDataContructorProxy.accessor = accessor; + } + + /** + * Creates a new instance of {@link DtmfData} backed by an internal instance of + * {@link DtmfDataConverter}. + * + * @param internalResponse The internal response. + * @return A new instance of {@link DtmfData}. + */ + public static DtmfData create(DtmfDataConverter internalResponse) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses DtmfData 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) { + try { + Class.forName(DtmfData.class.getName(), true, DtmfDataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } + + assert accessor != null; + return accessor.create(internalResponse); + } + + /** + * Creates a new instance of {@link DtmfData} + * + * @param data The dtmf data. + * @return A new instance of {@link DtmfData}. + */ + public static DtmfData create(String data) { + // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the + // application accesses DtmfData 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) { + try { + Class.forName(DtmfData.class.getName(), true, DtmfDataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } + } + + assert accessor != null; + return accessor.create(data); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/MediaStreamingSubscriptionConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/MediaStreamingSubscriptionConstructorProxy.java index a018a16ce9a7..c3d09b4acc35 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/MediaStreamingSubscriptionConstructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/MediaStreamingSubscriptionConstructorProxy.java @@ -5,11 +5,13 @@ import com.azure.communication.callautomation.implementation.models.MediaStreamingSubscriptionInternal; import com.azure.communication.callautomation.models.MediaStreamingSubscription; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link MediaStreamingSubscriptionInternal} across package boundaries. */ public final class MediaStreamingSubscriptionConstructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(MediaStreamingSubscriptionConstructorProxy.class); private static MediaStreamingSubscriptionConstructorAccessor accessor; private MediaStreamingSubscriptionConstructorProxy() { @@ -51,7 +53,12 @@ public static MediaStreamingSubscription create(MediaStreamingSubscriptionIntern // application accesses MediaStreamingSubscription 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 MediaStreamingSubscription(); + try { + Class.forName(MediaStreamingSubscription.class.getName(), true, + MediaStreamingSubscriptionConstructorAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/RecordingResultResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/RecordingResultResponseConstructorProxy.java deleted file mode 100644 index f568e14d15a2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/RecordingResultResponseConstructorProxy.java +++ /dev/null @@ -1,57 +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.RecordingResultResponse; -import com.azure.communication.callautomation.models.RecordingResult; - -/** - * Helper class to access private values of {@link RecordingResult} across package boundaries. - */ -public final class RecordingResultResponseConstructorProxy { - private static RecordingResultResponseConstructorAccessor accessor; - - private RecordingResultResponseConstructorProxy() { - } - - /** - * Type defining the methods to set the non-public properties of a {@link RecordingResultResponseConstructorAccessor} - * instance. - */ - public interface RecordingResultResponseConstructorAccessor { - /** - * Creates a new instance of {@link RecordingResult} backed by an internal instance of - * {@link RecordingResultResponse}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link RecordingResult}. - */ - RecordingResult create(RecordingResultResponse internalResponse); - } - - /** - * The method called from {@link RecordingResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void setAccessor(final RecordingResultResponseConstructorAccessor accessor) { - RecordingResultResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link RecordingResult} backed by an internal instance of - * {@link RecordingResultResponse}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link RecordingResult}. - */ - public static RecordingResult create(RecordingResultResponse internalResponse) { - if (accessor == null) { - new RecordingResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionDataContructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionDataContructorProxy.java index 75dcc0af02fa..2aa945b2b10b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionDataContructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionDataContructorProxy.java @@ -5,11 +5,13 @@ import com.azure.communication.callautomation.implementation.converters.TranscriptionDataConverter; import com.azure.communication.callautomation.models.TranscriptionData; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link TranscriptionData} across package boundaries. */ public final class TranscriptionDataContructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(TranscriptionDataContructorProxy.class); private static TranscriptionDataContructorProxyAccessor accessor; private TranscriptionDataContructorProxy() { @@ -51,7 +53,12 @@ public static TranscriptionData create(TranscriptionDataConverter internalRespon // application accesses AudioData 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 TranscriptionData(); + try { + Class.forName(TranscriptionData.class.getName(), true, + TranscriptionDataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionMetadataContructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionMetadataContructorProxy.java index 94bd5e35ad78..4441b00bf9b7 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionMetadataContructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionMetadataContructorProxy.java @@ -5,11 +5,13 @@ import com.azure.communication.callautomation.implementation.converters.TranscriptionMetadataConverter; import com.azure.communication.callautomation.models.TranscriptionMetadata; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link TranscriptionMetadata} across package boundaries. */ public final class TranscriptionMetadataContructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(TranscriptionMetadataContructorProxy.class); private static TranscriptionMetadataContructorProxyAccessor accessor; private TranscriptionMetadataContructorProxy() { @@ -51,7 +53,12 @@ public static TranscriptionMetadata create(TranscriptionMetadataConverter intern // application accesses TranscriptionMetadata 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 TranscriptionMetadata(); + try { + Class.forName(TranscriptionMetadata.class.getName(), true, + TranscriptionMetadataContructorProxyAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionSubscriptionConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionSubscriptionConstructorProxy.java index fe72968a6ad6..0222094755af 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionSubscriptionConstructorProxy.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/TranscriptionSubscriptionConstructorProxy.java @@ -5,11 +5,13 @@ import com.azure.communication.callautomation.implementation.models.TranscriptionSubscriptionInternal; import com.azure.communication.callautomation.models.TranscriptionSubscription; +import com.azure.core.util.logging.ClientLogger; /** * Helper class to access private values of {@link TranscriptionSubscriptionInternal} across package boundaries. */ public final class TranscriptionSubscriptionConstructorProxy { + private static final ClientLogger LOGGER = new ClientLogger(TranscriptionSubscriptionConstructorProxy.class); private static TranscriptionSubscriptionConstructorAccessor accessor; private TranscriptionSubscriptionConstructorProxy() { @@ -51,7 +53,12 @@ public static TranscriptionSubscription create(TranscriptionSubscriptionInternal // application accesses TranscriptionSubscription 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 TranscriptionSubscription(); + try { + Class.forName(TranscriptionSubscription.class.getName(), true, + TranscriptionSubscriptionConstructorAccessor.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw LOGGER.logExceptionAsError(new RuntimeException(e)); + } } assert accessor != null; diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java deleted file mode 100644 index 189449be0e0b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/UnmuteParticipantsResponseConstructorProxy.java +++ /dev/null @@ -1,60 +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.UnmuteParticipantsResponseInternal; -import com.azure.communication.callautomation.models.UnmuteParticipantResult; - -/** - * Helper class to access private values of {@link UnmuteParticipantResult} across package boundaries. - */ -public final class UnmuteParticipantsResponseConstructorProxy { - private static UnmuteParticipantsResponseConstructorAccessor accessor; - - private UnmuteParticipantsResponseConstructorProxy() { - } - - /** - * Type defining the methods to set the non-public properties of a {@link UnmuteParticipantsResponseConstructorAccessor} - * instance. - */ - public interface UnmuteParticipantsResponseConstructorAccessor { - /** - * Creates a new instance of {@link UnmuteParticipantResult} backed by an internal instance of - * {@link UnmuteParticipantsResponseInternal}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link UnmuteParticipantResult}. - */ - UnmuteParticipantResult create(UnmuteParticipantsResponseInternal internalResponse); - } - - /** - * The method called from {@link UnmuteParticipantResult} to set it's accessor. - * - * @param accessor The accessor. - */ - public static void setAccessor(final UnmuteParticipantsResponseConstructorAccessor accessor) { - UnmuteParticipantsResponseConstructorProxy.accessor = accessor; - } - - /** - * Creates a new instance of {@link UnmuteParticipantResult} backed by an internal instance of - * {@link UnmuteParticipantsResponseInternal}. - * - * @param internalResponse The internal response. - * @return A new instance of {@link UnmuteParticipantResult}. - */ - public static UnmuteParticipantResult create(UnmuteParticipantsResponseInternal 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 UnmuteParticipantResult(); - } - - assert accessor != null; - return accessor.create(internalResponse); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/AudioMetadataConverter.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/AudioMetadataConverter.java index d2660fa47a60..bf8a773ce4a8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/AudioMetadataConverter.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/AudioMetadataConverter.java @@ -3,11 +3,11 @@ package com.azure.communication.callautomation.implementation.converters; +import java.io.IOException; + import com.azure.json.JsonReader; import com.azure.json.JsonToken; -import java.io.IOException; - /** The Audio * MetadataInternal model. */ public final class AudioMetadataConverter { @@ -32,11 +32,6 @@ public final class AudioMetadataConverter { */ private int channels; - /* - * The length. - */ - private int length; - /** * Get the mediaSubscriptionId property. * @@ -73,15 +68,6 @@ public int getChannels() { return channels; } - /** - * Get the length property. - * - * @return the length value. - */ - public int getLength() { - return length; - } - /** * Reads an instance of AudioMetadataConverter from the JsonReader. *

@@ -107,8 +93,6 @@ public static AudioMetadataConverter fromJson(JsonReader jsonReader) throws IOEx converter.sampleRate = reader.getInt(); } else if ("channels".equals(fieldName)) { converter.channels = reader.getInt(); - } else if ("length".equals(fieldName)) { - converter.length = reader.getInt(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/DtmfDataConverter.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/DtmfDataConverter.java new file mode 100644 index 000000000000..f6e219c41bac --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/DtmfDataConverter.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callautomation.implementation.converters; + +import java.io.IOException; + +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; + +/** The DtmfDataInternal model. */ +public final class DtmfDataConverter { + + /* + * The dtmf data. + */ + private String data; + + /* + * The timestamp of when the media was sourced. + */ + private String timestamp; + + /* + * The participantId. + */ + private String participantRawID; + + /** + * Get the data property. + * + * @return the data value. + */ + public String getData() { + return data; + } + + /** + * Get the timestamp property. + * + * @return the timestamp value. + */ + public String getTimestamp() { + return timestamp; + } + + /** + * Get the participantRawID property. + * + * @return the participantRawID value. + */ + public String getParticipantRawID() { + return participantRawID; + } + + /** + * Reads an instance of DtmfMetadataConverter from the JsonReader. + *

+ * Note: DtmfDataConverter does not have to implement JsonSerializable, model is only used in deserialization + * context internally by {@link StreamingDataParser} and not serialized. + *

+ * @param jsonReader The JsonReader being read. + * @return An instance of FileSource if the JsonReader was pointing to an instance of it, or + * null if it was pointing to JSON null. + * @throws IOException If an error occurs while reading the FileSource. + */ + public static DtmfDataConverter fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + final DtmfDataConverter converter = new DtmfDataConverter(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("data".equals(fieldName)) { + converter.data = reader.getString(); + } else if ("timestamp".equals(fieldName)) { + converter.timestamp = reader.getString(); + } else if ("participantRawID".equals(fieldName)) { + converter.participantRawID = reader.getString(); + } else { + reader.skipChildren(); + } + } + return converter; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/TranscriptionMetadataConverter.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/TranscriptionMetadataConverter.java index c72cd3778ab0..0ebf2f139577 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/TranscriptionMetadataConverter.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/converters/TranscriptionMetadataConverter.java @@ -33,6 +33,11 @@ public final class TranscriptionMetadataConverter { */ private String correlationId; + /* + * The custom speech recognition model endpoint id + */ + private String speechRecognitionModelEndpointId; + /** * Get the transcriptionSubscriptionId property. * @@ -69,6 +74,15 @@ public String getCorrelationId() { return correlationId; } + /** + * Get the speechRecognitionModelEndpointId property. + * + * @return the speechRecognitionModelEndpointId value. + */ + public String getSpeechRecognitionModelEndpointId() { + return speechRecognitionModelEndpointId; + } + /** * Reads an instance of TranscriptionMetadataConverter from the JsonReader. *

@@ -94,6 +108,8 @@ public static TranscriptionMetadataConverter fromJson(JsonReader jsonReader) thr converter.callConnectionId = reader.getString(); } else if ("correlationId".equals(fieldName)) { converter.correlationId = reader.getString(); + } else if ("speechRecognitionModelEndpointId".equals(fieldName)) { + converter.speechRecognitionModelEndpointId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java index 39ee16313efc..8cf0efeaabe3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java @@ -29,12 +29,6 @@ public final class AnswerCallRequestInternal implements JsonSerializable { /** - * Pcm16KMono. + * Static value pcm16KMono for AudioFormatInternal. */ @Generated - public static final AudioFormatInternal PCM_16K_MONO = fromString("Pcm16KMono"); + public static final AudioFormatInternal PCM_16K_MONO = fromString("pcm16KMono"); /** - * Pcm24KMono. + * Static value pcm24KMono for AudioFormatInternal. */ @Generated - public static final AudioFormatInternal PCM_24K_MONO = fromString("Pcm24KMono"); + public static final AudioFormatInternal PCM_24K_MONO = fromString("pcm24KMono"); /** * Creates a new instance of AudioFormatInternal value. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialog.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialog.java index 18bc9041ad45..f61fef8ebff3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialog.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialog.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,13 +19,11 @@ public final class AzureOpenAIDialog extends BaseDialog { /* * Determines the type of the dialog. */ - @Generated private DialogInputType kind = DialogInputType.AZURE_OPEN_AI; /** * Creates an instance of AzureOpenAIDialog class. */ - @Generated public AzureOpenAIDialog() { } @@ -35,7 +32,6 @@ public AzureOpenAIDialog() { * * @return the kind value. */ - @Generated @Override public DialogInputType getKind() { return this.kind; @@ -44,7 +40,6 @@ public DialogInputType getKind() { /** * {@inheritDoc} */ - @Generated @Override public AzureOpenAIDialog setContext(Map context) { super.setContext(context); @@ -54,7 +49,6 @@ public AzureOpenAIDialog setContext(Map context) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -72,7 +66,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the AzureOpenAIDialog. */ - @Generated public static AzureOpenAIDialog fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { AzureOpenAIDialog deserializedAzureOpenAIDialog = new AzureOpenAIDialog(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialogUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialogUpdate.java index 54939e01e17c..e5226a889487 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialogUpdate.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AzureOpenAIDialogUpdate.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,13 +19,11 @@ public final class AzureOpenAIDialogUpdate extends DialogUpdateBase { /* * Determines the type of the dialog. */ - @Generated private DialogInputType kind = DialogInputType.AZURE_OPEN_AI; /** * Creates an instance of AzureOpenAIDialogUpdate class. */ - @Generated public AzureOpenAIDialogUpdate() { } @@ -35,7 +32,6 @@ public AzureOpenAIDialogUpdate() { * * @return the kind value. */ - @Generated @Override public DialogInputType getKind() { return this.kind; @@ -44,7 +40,6 @@ public DialogInputType getKind() { /** * {@inheritDoc} */ - @Generated @Override public AzureOpenAIDialogUpdate setContext(Map context) { super.setContext(context); @@ -54,7 +49,6 @@ public AzureOpenAIDialogUpdate setContext(Map context) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -71,7 +65,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * was pointing to JSON null. * @throws IOException If an error occurs while reading the AzureOpenAIDialogUpdate. */ - @Generated public static AzureOpenAIDialogUpdate fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { AzureOpenAIDialogUpdate deserializedAzureOpenAIDialogUpdate = new AzureOpenAIDialogUpdate(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/BaseDialog.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/BaseDialog.java index f46d0c260805..aa1de0abff83 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/BaseDialog.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/BaseDialog.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,20 +20,18 @@ public class BaseDialog implements JsonSerializable { /* * Determines the type of the dialog. */ - @Generated - private DialogInputType kind = DialogInputType.fromString("BaseDialog"); + private DialogInputType kind; /* * Dialog context. */ - @Generated private Map context; /** * Creates an instance of BaseDialog class. */ - @Generated public BaseDialog() { + this.kind = DialogInputType.fromString("BaseDialog"); } /** @@ -42,7 +39,6 @@ public BaseDialog() { * * @return the kind value. */ - @Generated public DialogInputType getKind() { return this.kind; } @@ -52,7 +48,6 @@ public DialogInputType getKind() { * * @return the context value. */ - @Generated public Map getContext() { return this.context; } @@ -63,7 +58,6 @@ public Map getContext() { * @param context the context value to set. * @return the BaseDialog object itself. */ - @Generated public BaseDialog setContext(Map context) { this.context = context; return this; @@ -72,7 +66,6 @@ public BaseDialog setContext(Map context) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -90,7 +83,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the BaseDialog. */ - @Generated public static BaseDialog fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; @@ -118,7 +110,6 @@ public static BaseDialog fromJson(JsonReader jsonReader) throws IOException { }); } - @Generated static BaseDialog fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { BaseDialog deserializedBaseDialog = new BaseDialog(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java index 0b8730aa9b11..da4ef6d9dde3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java @@ -79,18 +79,6 @@ public final class CallConnectionPropertiesInternal implements JsonSerializable< @Generated private CommunicationUserIdentifierModel answeredBy; - /* - * SubscriptionId for media streaming - */ - @Generated - private String mediaSubscriptionId; - - /* - * SubscriptionId for transcription - */ - @Generated - private String dataSubscriptionId; - /* * The state of media streaming subscription for the call */ @@ -344,50 +332,6 @@ public CallConnectionPropertiesInternal setAnsweredBy(CommunicationUserIdentifie return this; } - /** - * Get the mediaSubscriptionId property: SubscriptionId for media streaming. - * - * @return the mediaSubscriptionId value. - */ - @Generated - public String getMediaSubscriptionId() { - return this.mediaSubscriptionId; - } - - /** - * Set the mediaSubscriptionId property: SubscriptionId for media streaming. - * - * @param mediaSubscriptionId the mediaSubscriptionId value to set. - * @return the CallConnectionPropertiesInternal object itself. - */ - @Generated - public CallConnectionPropertiesInternal setMediaSubscriptionId(String mediaSubscriptionId) { - this.mediaSubscriptionId = mediaSubscriptionId; - return this; - } - - /** - * Get the dataSubscriptionId property: SubscriptionId for transcription. - * - * @return the dataSubscriptionId value. - */ - @Generated - public String getDataSubscriptionId() { - return this.dataSubscriptionId; - } - - /** - * Set the dataSubscriptionId property: SubscriptionId for transcription. - * - * @param dataSubscriptionId the dataSubscriptionId value to set. - * @return the CallConnectionPropertiesInternal object itself. - */ - @Generated - public CallConnectionPropertiesInternal setDataSubscriptionId(String dataSubscriptionId) { - this.dataSubscriptionId = dataSubscriptionId; - return this; - } - /** * Get the mediaStreamingSubscription property: The state of media streaming subscription for the call. * @@ -476,8 +420,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeJsonField("source", this.source); jsonWriter.writeStringField("correlationId", this.correlationId); jsonWriter.writeJsonField("answeredBy", this.answeredBy); - jsonWriter.writeStringField("mediaSubscriptionId", this.mediaSubscriptionId); - jsonWriter.writeStringField("dataSubscriptionId", this.dataSubscriptionId); jsonWriter.writeJsonField("mediaStreamingSubscription", this.mediaStreamingSubscription); jsonWriter.writeJsonField("transcriptionSubscription", this.transcriptionSubscription); jsonWriter.writeJsonField("answeredFor", this.answeredFor); @@ -526,10 +468,6 @@ public static CallConnectionPropertiesInternal fromJson(JsonReader jsonReader) t } else if ("answeredBy".equals(fieldName)) { deserializedCallConnectionPropertiesInternal.answeredBy = CommunicationUserIdentifierModel.fromJson(reader); - } else if ("mediaSubscriptionId".equals(fieldName)) { - deserializedCallConnectionPropertiesInternal.mediaSubscriptionId = reader.getString(); - } else if ("dataSubscriptionId".equals(fieldName)) { - deserializedCallConnectionPropertiesInternal.dataSubscriptionId = reader.getString(); } else if ("mediaStreamingSubscription".equals(fieldName)) { deserializedCallConnectionPropertiesInternal.mediaStreamingSubscription = MediaStreamingSubscriptionInternal.fromJson(reader); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java index 576e4ca84ea2..9523ccda6160 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallIntelligenceOptionsInternal.java @@ -23,12 +23,6 @@ public final class CallIntelligenceOptionsInternal implements JsonSerializable values() { return values(CallSessionEndReason.class); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/ChoiceResultInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/ChoiceResultInternal.java index 07bb942e4c4a..cdc428acfc74 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/ChoiceResultInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/ChoiceResultInternal.java @@ -31,6 +31,12 @@ public final class ChoiceResultInternal implements JsonSerializable { /** * Static value chunkIsBeingRecorded for ChunkEndReason. */ - @Generated public static final ChunkEndReason CHUNK_IS_BEING_RECORDED = fromString("chunkIsBeingRecorded"); /** * Static value sessionEnded for ChunkEndReason. */ - @Generated public static final ChunkEndReason SESSION_ENDED = fromString("sessionEnded"); /** * Static value chunkMaximumSizeExceeded for ChunkEndReason. */ - @Generated public static final ChunkEndReason CHUNK_MAXIMUM_SIZE_EXCEEDED = fromString("chunkMaximumSizeExceeded"); /** * Static value chunkMaximumTimeExceeded for ChunkEndReason. */ - @Generated public static final ChunkEndReason CHUNK_MAXIMUM_TIME_EXCEEDED = fromString("chunkMaximumTimeExceeded"); /** * Static value chunkUploadFailure for ChunkEndReason. */ - @Generated public static final ChunkEndReason CHUNK_UPLOAD_FAILURE = fromString("chunkUploadFailure"); /** @@ -47,7 +41,6 @@ public final class ChunkEndReason extends ExpandableStringEnum { * * @deprecated Use the {@link #fromString(String)} factory method. */ - @Generated @Deprecated public ChunkEndReason() { } @@ -58,7 +51,6 @@ public ChunkEndReason() { * @param name a name to look for. * @return the corresponding ChunkEndReason. */ - @Generated public static ChunkEndReason fromString(String name) { return fromString(name, ChunkEndReason.class); } @@ -68,7 +60,6 @@ public static ChunkEndReason fromString(String name) { * * @return known ChunkEndReason values. */ - @Generated public static Collection values() { return values(ChunkEndReason.class); } 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 f974e0adc7be..ade71b4685a3 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 @@ -55,12 +55,6 @@ public final class CommunicationIdentifierModel implements JsonSerializable sipHeaders; - /* - * Custom calling context TeamsPhoneCallDetails - */ - @Generated - private TeamsPhoneCallDetails teamsPhoneCallDetails; - /** * Creates an instance of CustomCallingContext class. */ @@ -87,28 +81,6 @@ public CustomCallingContext setSipHeaders(Map sipHeaders) { return this; } - /** - * Get the teamsPhoneCallDetails property: Custom calling context TeamsPhoneCallDetails. - * - * @return the teamsPhoneCallDetails value. - */ - @Generated - public TeamsPhoneCallDetails getTeamsPhoneCallDetails() { - return this.teamsPhoneCallDetails; - } - - /** - * Set the teamsPhoneCallDetails property: Custom calling context TeamsPhoneCallDetails. - * - * @param teamsPhoneCallDetails the teamsPhoneCallDetails value to set. - * @return the CustomCallingContext object itself. - */ - @Generated - public CustomCallingContext setTeamsPhoneCallDetails(TeamsPhoneCallDetails teamsPhoneCallDetails) { - this.teamsPhoneCallDetails = teamsPhoneCallDetails; - return this; - } - /** * {@inheritDoc} */ @@ -118,7 +90,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeMapField("voipHeaders", this.voipHeaders, (writer, element) -> writer.writeString(element)); jsonWriter.writeMapField("sipHeaders", this.sipHeaders, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("teamsPhoneCallDetails", this.teamsPhoneCallDetails); return jsonWriter.writeEndObject(); } @@ -144,8 +115,6 @@ public static CustomCallingContext fromJson(JsonReader jsonReader) throws IOExce } else if ("sipHeaders".equals(fieldName)) { Map sipHeaders = reader.readMap(reader1 -> reader1.getString()); deserializedCustomCallingContext.sipHeaders = sipHeaders; - } else if ("teamsPhoneCallDetails".equals(fieldName)) { - deserializedCustomCallingContext.teamsPhoneCallDetails = TeamsPhoneCallDetails.fromJson(reader); } else { reader.skipChildren(); } 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 index 2a1cb498e266..66abdbdb445c 100644 --- 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 @@ -4,7 +4,6 @@ package com.azure.communication.callautomation.implementation.models; -import com.azure.core.annotation.Generated; import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; @@ -15,13 +14,11 @@ public final class DialogInputType extends ExpandableStringEnum /** * Static value powerVirtualAgents for DialogInputType. */ - @Generated public static final DialogInputType POWER_VIRTUAL_AGENTS = fromString("powerVirtualAgents"); /** * Static value azureOpenAI for DialogInputType. */ - @Generated public static final DialogInputType AZURE_OPEN_AI = fromString("azureOpenAI"); /** @@ -29,7 +26,6 @@ public final class DialogInputType extends ExpandableStringEnum * * @deprecated Use the {@link #fromString(String)} factory method. */ - @Generated @Deprecated public DialogInputType() { } @@ -40,7 +36,6 @@ public DialogInputType() { * @param name a name to look for. * @return the corresponding DialogInputType. */ - @Generated public static DialogInputType fromString(String name) { return fromString(name, DialogInputType.class); } @@ -50,7 +45,6 @@ public static DialogInputType fromString(String name) { * * @return known DialogInputType values. */ - @Generated 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/DialogStateResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogStateResponse.java index 4800283830af..1cd671cb6c9f 100644 --- 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 @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,25 +19,21 @@ public final class DialogStateResponse implements JsonSerializable { DialogStateResponse deserializedDialogStateResponse = new DialogStateResponse(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdateBase.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdateBase.java index 3c49df48abd7..8fc8d21c6161 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdateBase.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdateBase.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,20 +20,18 @@ public class DialogUpdateBase implements JsonSerializable { /* * Determines the type of the dialog. */ - @Generated - private DialogInputType kind = DialogInputType.fromString("DialogUpdateBase"); + private DialogInputType kind; /* * Dialog context. */ - @Generated private Map context; /** * Creates an instance of DialogUpdateBase class. */ - @Generated public DialogUpdateBase() { + this.kind = DialogInputType.fromString("DialogUpdateBase"); } /** @@ -42,7 +39,6 @@ public DialogUpdateBase() { * * @return the kind value. */ - @Generated public DialogInputType getKind() { return this.kind; } @@ -52,7 +48,6 @@ public DialogInputType getKind() { * * @return the context value. */ - @Generated public Map getContext() { return this.context; } @@ -63,7 +58,6 @@ public Map getContext() { * @param context the context value to set. * @return the DialogUpdateBase object itself. */ - @Generated public DialogUpdateBase setContext(Map context) { this.context = context; return this; @@ -72,7 +66,6 @@ public DialogUpdateBase setContext(Map context) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -89,7 +82,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * pointing to JSON null. * @throws IOException If an error occurs while reading the DialogUpdateBase. */ - @Generated public static DialogUpdateBase fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { String discriminatorValue = null; @@ -115,7 +107,6 @@ public static DialogUpdateBase fromJson(JsonReader jsonReader) throws IOExceptio }); } - @Generated static DialogUpdateBase fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { DialogUpdateBase deserializedDialogUpdateBase = new DialogUpdateBase(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdated.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdated.java index fb60a92a10bc..37fc002244d3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdated.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogUpdated.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,55 +19,46 @@ public final class DialogUpdated implements JsonSerializable { /* * Determines the type of the dialog. */ - @Generated private DialogInputType dialogInputType; /* * Dialog ID */ - @Generated private String dialogId; /* * IVR context */ - @Generated private Object ivrContext; /* * Call connection ID. */ - @Generated private String callConnectionId; /* * Server call ID. */ - @Generated private String serverCallId; /* * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. */ - @Generated private String correlationId; /* * Used by customers when calling mid-call actions to correlate the request to the response event. */ - @Generated private String operationContext; /* * Contains the resulting SIP code, sub-code and message. */ - @Generated private ResultInformation resultInformation; /** * Creates an instance of DialogUpdated class. */ - @Generated public DialogUpdated() { } @@ -77,7 +67,6 @@ public DialogUpdated() { * * @return the dialogInputType value. */ - @Generated public DialogInputType getDialogInputType() { return this.dialogInputType; } @@ -88,7 +77,6 @@ public DialogInputType getDialogInputType() { * @param dialogInputType the dialogInputType value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setDialogInputType(DialogInputType dialogInputType) { this.dialogInputType = dialogInputType; return this; @@ -99,7 +87,6 @@ public DialogUpdated setDialogInputType(DialogInputType dialogInputType) { * * @return the dialogId value. */ - @Generated public String getDialogId() { return this.dialogId; } @@ -109,7 +96,6 @@ public String getDialogId() { * * @return the ivrContext value. */ - @Generated public Object getIvrContext() { return this.ivrContext; } @@ -119,7 +105,6 @@ public Object getIvrContext() { * * @return the callConnectionId value. */ - @Generated public String getCallConnectionId() { return this.callConnectionId; } @@ -130,7 +115,6 @@ public String getCallConnectionId() { * @param callConnectionId the callConnectionId value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setCallConnectionId(String callConnectionId) { this.callConnectionId = callConnectionId; return this; @@ -141,7 +125,6 @@ public DialogUpdated setCallConnectionId(String callConnectionId) { * * @return the serverCallId value. */ - @Generated public String getServerCallId() { return this.serverCallId; } @@ -152,7 +135,6 @@ public String getServerCallId() { * @param serverCallId the serverCallId value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setServerCallId(String serverCallId) { this.serverCallId = serverCallId; return this; @@ -164,7 +146,6 @@ public DialogUpdated setServerCallId(String serverCallId) { * * @return the correlationId value. */ - @Generated public String getCorrelationId() { return this.correlationId; } @@ -176,7 +157,6 @@ public String getCorrelationId() { * @param correlationId the correlationId value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setCorrelationId(String correlationId) { this.correlationId = correlationId; return this; @@ -188,7 +168,6 @@ public DialogUpdated setCorrelationId(String correlationId) { * * @return the operationContext value. */ - @Generated public String getOperationContext() { return this.operationContext; } @@ -200,7 +179,6 @@ public String getOperationContext() { * @param operationContext the operationContext value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setOperationContext(String operationContext) { this.operationContext = operationContext; return this; @@ -211,7 +189,6 @@ public DialogUpdated setOperationContext(String operationContext) { * * @return the resultInformation value. */ - @Generated public ResultInformation getResultInformation() { return this.resultInformation; } @@ -222,7 +199,6 @@ public ResultInformation getResultInformation() { * @param resultInformation the resultInformation value to set. * @return the DialogUpdated object itself. */ - @Generated public DialogUpdated setResultInformation(ResultInformation resultInformation) { this.resultInformation = resultInformation; return this; @@ -231,7 +207,6 @@ public DialogUpdated setResultInformation(ResultInformation resultInformation) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -253,7 +228,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * pointing to JSON null. * @throws IOException If an error occurs while reading the DialogUpdated. */ - @Generated public static DialogUpdated fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { DialogUpdated deserializedDialogUpdated = new DialogUpdated(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Error.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Error.java index 8ff9d32375c8..7fd4d787da01 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Error.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Error.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,25 +19,21 @@ public final class Error implements JsonSerializable { /* * Error code */ - @Generated private String code; /* * Error message */ - @Generated private String message; /* * Inner error details */ - @Generated private Error innerError; /** * Creates an instance of Error class. */ - @Generated public Error() { } @@ -47,7 +42,6 @@ public Error() { * * @return the code value. */ - @Generated public String getCode() { return this.code; } @@ -58,7 +52,6 @@ public String getCode() { * @param code the code value to set. * @return the Error object itself. */ - @Generated public Error setCode(String code) { this.code = code; return this; @@ -69,7 +62,6 @@ public Error setCode(String code) { * * @return the message value. */ - @Generated public String getMessage() { return this.message; } @@ -80,7 +72,6 @@ public String getMessage() { * @param message the message value to set. * @return the Error object itself. */ - @Generated public Error setMessage(String message) { this.message = message; return this; @@ -91,7 +82,6 @@ public Error setMessage(String message) { * * @return the innerError value. */ - @Generated public Error getInnerError() { return this.innerError; } @@ -102,7 +92,6 @@ public Error getInnerError() { * @param innerError the innerError value to set. * @return the Error object itself. */ - @Generated public Error setInnerError(Error innerError) { this.innerError = innerError; return this; @@ -111,7 +100,6 @@ public Error setInnerError(Error innerError) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -129,7 +117,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * JSON null. * @throws IOException If an error occurs while reading the Error. */ - @Generated public static Error fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { Error deserializedError = new Error(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldAudioCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldAudioCompleted.java index acfadcc67e50..d4a3a740d3ae 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldAudioCompleted.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldAudioCompleted.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,37 +19,31 @@ public final class HoldAudioCompleted implements JsonSerializable { HoldAudioCompleted deserializedHoldAudioCompleted = new HoldAudioCompleted(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/InterruptAudioAndAnnounceRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/InterruptAudioAndAnnounceRequest.java index 6300f6637909..74e7e5c8dbe0 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/InterruptAudioAndAnnounceRequest.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/InterruptAudioAndAnnounceRequest.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -21,26 +20,22 @@ public final class InterruptAudioAndAnnounceRequest implements JsonSerializable< /* * The source of the audio to be played. */ - @Generated private List playSources; /* * The list of call participants play provided audio to. * Plays to everyone in the call when not provided. */ - @Generated private CommunicationIdentifierModel playTo; /* * The value to identify context of the operation. */ - @Generated private String operationContext; /** * Creates an instance of InterruptAudioAndAnnounceRequest class. */ - @Generated public InterruptAudioAndAnnounceRequest() { } @@ -49,7 +44,6 @@ public InterruptAudioAndAnnounceRequest() { * * @return the playSources value. */ - @Generated public List getPlaySources() { return this.playSources; } @@ -60,7 +54,6 @@ public List getPlaySources() { * @param playSources the playSources value to set. * @return the InterruptAudioAndAnnounceRequest object itself. */ - @Generated public InterruptAudioAndAnnounceRequest setPlaySources(List playSources) { this.playSources = playSources; return this; @@ -72,7 +65,6 @@ public InterruptAudioAndAnnounceRequest setPlaySources(List * * @return the playTo value. */ - @Generated public CommunicationIdentifierModel getPlayTo() { return this.playTo; } @@ -84,7 +76,6 @@ public CommunicationIdentifierModel getPlayTo() { * @param playTo the playTo value to set. * @return the InterruptAudioAndAnnounceRequest object itself. */ - @Generated public InterruptAudioAndAnnounceRequest setPlayTo(CommunicationIdentifierModel playTo) { this.playTo = playTo; return this; @@ -95,7 +86,6 @@ public InterruptAudioAndAnnounceRequest setPlayTo(CommunicationIdentifierModel p * * @return the operationContext value. */ - @Generated public String getOperationContext() { return this.operationContext; } @@ -106,7 +96,6 @@ public String getOperationContext() { * @param operationContext the operationContext value to set. * @return the InterruptAudioAndAnnounceRequest object itself. */ - @Generated public InterruptAudioAndAnnounceRequest setOperationContext(String operationContext) { this.operationContext = operationContext; return this; @@ -115,7 +104,6 @@ public InterruptAudioAndAnnounceRequest setOperationContext(String operationCont /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -134,7 +122,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the InterruptAudioAndAnnounceRequest. */ - @Generated public static InterruptAudioAndAnnounceRequest fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { InterruptAudioAndAnnounceRequest deserializedInterruptAudioAndAnnounceRequest diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingAudioChannelTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingAudioChannelTypeInternal.java index e02a8aa03b0a..9d6fdf3903eb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingAudioChannelTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingAudioChannelTypeInternal.java @@ -9,7 +9,7 @@ import java.util.Collection; /** - * Audio channel type to stream, eg. unmixed audio, mixed audio. + * The audio channel type to stream, e.g., unmixed audio, mixed audio. */ public final class MediaStreamingAudioChannelTypeInternal extends ExpandableStringEnum { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java index 64d01b35e06c..372d93c41576 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingContentTypeInternal.java @@ -9,7 +9,7 @@ import java.util.Collection; /** - * Content type to stream, eg. audio. + * Defines values for MediaStreamingContentTypeInternal. */ public final class MediaStreamingContentTypeInternal extends ExpandableStringEnum { /** diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptions.java deleted file mode 100644 index 4b29342ffa96..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptions.java +++ /dev/null @@ -1,262 +0,0 @@ -// 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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of Media streaming. - */ -@Fluent -public final class MediaStreamingOptions implements JsonSerializable { - /* - * Transport URL for media streaming - */ - private String transportUrl; - - /* - * The type of transport to be used for media streaming, eg. Websocket - */ - private MediaStreamingTransportTypeInternal transportType; - - /* - * Content type to stream, eg. audio - */ - private MediaStreamingContentTypeInternal contentType; - - /* - * Audio channel type to stream, eg. unmixed audio, mixed audio - */ - private MediaStreamingAudioChannelTypeInternal audioChannelType; - - /* - * Determines if the media streaming should be started immediately after call is answered or not. - */ - private Boolean startMediaStreaming; - - /* - * A value indicating whether bidirectional streaming is enabled. - */ - private Boolean enableBidirectional; - - /* - * Specifies the audio format used for encoding, including sample rate and channel type. - */ - private AudioFormat audioFormat; - - /** - * Creates an instance of MediaStreamingOptions class. - */ - public MediaStreamingOptions() { - } - - /** - * Get the transportUrl property: Transport URL for media streaming. - * - * @return the transportUrl value. - */ - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for media streaming. - * - * @param transportUrl the transportUrl value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for media streaming, eg. Websocket. - * - * @return the transportType value. - */ - public MediaStreamingTransportTypeInternal getTransportType() { - return this.transportType; - } - - /** - * Set the transportType property: The type of transport to be used for media streaming, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setTransportType(MediaStreamingTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the contentType property: Content type to stream, eg. audio. - * - * @return the contentType value. - */ - public MediaStreamingContentTypeInternal getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: Content type to stream, eg. audio. - * - * @param contentType the contentType value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setContentType(MediaStreamingContentTypeInternal contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. - * - * @return the audioChannelType value. - */ - public MediaStreamingAudioChannelTypeInternal getAudioChannelType() { - return this.audioChannelType; - } - - /** - * Set the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. - * - * @param audioChannelType the audioChannelType value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setAudioChannelType(MediaStreamingAudioChannelTypeInternal audioChannelType) { - this.audioChannelType = audioChannelType; - return this; - } - - /** - * Get the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @return the startMediaStreaming value. - */ - public Boolean isStartMediaStreaming() { - return this.startMediaStreaming; - } - - /** - * Set the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @param startMediaStreaming the startMediaStreaming value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setStartMediaStreaming(Boolean startMediaStreaming) { - this.startMediaStreaming = startMediaStreaming; - return this; - } - - /** - * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @return the enableBidirectional value. - */ - public Boolean isEnableBidirectional() { - return this.enableBidirectional; - } - - /** - * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @param enableBidirectional the enableBidirectional value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setEnableBidirectional(Boolean enableBidirectional) { - this.enableBidirectional = enableBidirectional; - return this; - } - - /** - * Get the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @return the audioFormat value. - */ - public AudioFormat getAudioFormat() { - return this.audioFormat; - } - - /** - * Set the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @param audioFormat the audioFormat value to set. - * @return the MediaStreamingOptions object itself. - */ - public MediaStreamingOptions setAudioFormat(AudioFormat audioFormat) { - this.audioFormat = audioFormat; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); - jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); - jsonWriter.writeStringField("audioChannelType", - this.audioChannelType == null ? null : this.audioChannelType.toString()); - jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); - jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); - jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MediaStreamingOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MediaStreamingOptions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MediaStreamingOptions. - */ - public static MediaStreamingOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MediaStreamingOptions deserializedMediaStreamingOptions = new MediaStreamingOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("transportUrl".equals(fieldName)) { - deserializedMediaStreamingOptions.transportUrl = reader.getString(); - } else if ("transportType".equals(fieldName)) { - deserializedMediaStreamingOptions.transportType - = MediaStreamingTransportTypeInternal.fromString(reader.getString()); - } else if ("contentType".equals(fieldName)) { - deserializedMediaStreamingOptions.contentType - = MediaStreamingContentTypeInternal.fromString(reader.getString()); - } else if ("audioChannelType".equals(fieldName)) { - deserializedMediaStreamingOptions.audioChannelType - = MediaStreamingAudioChannelTypeInternal.fromString(reader.getString()); - } else if ("startMediaStreaming".equals(fieldName)) { - deserializedMediaStreamingOptions.startMediaStreaming = reader.getNullable(JsonReader::getBoolean); - } else if ("enableBidirectional".equals(fieldName)) { - deserializedMediaStreamingOptions.enableBidirectional = reader.getNullable(JsonReader::getBoolean); - } else if ("audioFormat".equals(fieldName)) { - deserializedMediaStreamingOptions.audioFormat = AudioFormat.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedMediaStreamingOptions; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java index 379c3d878178..1e1677fb935a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingOptionsInternal.java @@ -13,52 +13,24 @@ import java.io.IOException; /** - * Configuration of Media streaming. + * Options for media streaming. */ @Fluent -public final class MediaStreamingOptionsInternal implements JsonSerializable { +public class MediaStreamingOptionsInternal implements JsonSerializable { /* - * Transport URL for media streaming + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. */ @Generated - private String transportUrl; + private StreamingTransportTypeInternal transportType + = StreamingTransportTypeInternal.fromString("MediaStreamingOptionsInternal"); /* - * The type of transport to be used for media streaming, eg. Websocket - */ - @Generated - private MediaStreamingTransportTypeInternal transportType; - - /* - * Content type to stream, eg. audio - */ - @Generated - private MediaStreamingContentTypeInternal contentType; - - /* - * Audio channel type to stream, eg. unmixed audio, mixed audio + * The audio channel type to stream, e.g., unmixed audio, mixed audio. */ @Generated private MediaStreamingAudioChannelTypeInternal audioChannelType; - /* - * Determines if the media streaming should be started immediately after call is answered or not. - */ - @Generated - private Boolean startMediaStreaming; - - /* - * A value indicating whether bidirectional streaming is enabled. - */ - @Generated - private Boolean enableBidirectional; - - /* - * Specifies the audio format used for encoding, including sample rate and channel type. - */ - @Generated - private AudioFormatInternal audioFormat; - /** * Creates an instance of MediaStreamingOptionsInternal class. */ @@ -67,73 +39,18 @@ public MediaStreamingOptionsInternal() { } /** - * Get the transportUrl property: Transport URL for media streaming. - * - * @return the transportUrl value. - */ - @Generated - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for media streaming. - * - * @param transportUrl the transportUrl value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for media streaming, eg. Websocket. + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. * * @return the transportType value. */ @Generated - public MediaStreamingTransportTypeInternal getTransportType() { + public StreamingTransportTypeInternal getTransportType() { return this.transportType; } /** - * Set the transportType property: The type of transport to be used for media streaming, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setTransportType(MediaStreamingTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the contentType property: Content type to stream, eg. audio. - * - * @return the contentType value. - */ - @Generated - public MediaStreamingContentTypeInternal getContentType() { - return this.contentType; - } - - /** - * Set the contentType property: Content type to stream, eg. audio. - * - * @param contentType the contentType value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setContentType(MediaStreamingContentTypeInternal contentType) { - this.contentType = contentType; - return this; - } - - /** - * Get the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * Get the audioChannelType property: The audio channel type to stream, e.g., unmixed audio, mixed audio. * * @return the audioChannelType value. */ @@ -143,7 +60,7 @@ public MediaStreamingAudioChannelTypeInternal getAudioChannelType() { } /** - * Set the audioChannelType property: Audio channel type to stream, eg. unmixed audio, mixed audio. + * Set the audioChannelType property: The audio channel type to stream, e.g., unmixed audio, mixed audio. * * @param audioChannelType the audioChannelType value to set. * @return the MediaStreamingOptionsInternal object itself. @@ -154,76 +71,6 @@ public MediaStreamingOptionsInternal setAudioChannelType(MediaStreamingAudioChan return this; } - /** - * Get the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @return the startMediaStreaming value. - */ - @Generated - public Boolean isStartMediaStreaming() { - return this.startMediaStreaming; - } - - /** - * Set the startMediaStreaming property: Determines if the media streaming should be started immediately after call - * is answered or not. - * - * @param startMediaStreaming the startMediaStreaming value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setStartMediaStreaming(Boolean startMediaStreaming) { - this.startMediaStreaming = startMediaStreaming; - return this; - } - - /** - * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @return the enableBidirectional value. - */ - @Generated - public Boolean isEnableBidirectional() { - return this.enableBidirectional; - } - - /** - * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * - * @param enableBidirectional the enableBidirectional value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setEnableBidirectional(Boolean enableBidirectional) { - this.enableBidirectional = enableBidirectional; - return this; - } - - /** - * Get the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @return the audioFormat value. - */ - @Generated - public AudioFormatInternal getAudioFormat() { - return this.audioFormat; - } - - /** - * Set the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel - * type. - * - * @param audioFormat the audioFormat value to set. - * @return the MediaStreamingOptionsInternal object itself. - */ - @Generated - public MediaStreamingOptionsInternal setAudioFormat(AudioFormatInternal audioFormat) { - this.audioFormat = audioFormat; - return this; - } - /** * {@inheritDoc} */ @@ -231,14 +78,9 @@ public MediaStreamingOptionsInternal setAudioFormat(AudioFormatInternal audioFor @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); - jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); jsonWriter.writeStringField("audioChannelType", this.audioChannelType == null ? null : this.audioChannelType.toString()); - jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); - jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); - jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); return jsonWriter.writeEndObject(); } @@ -253,6 +95,32 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { */ @Generated public static MediaStreamingOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("transportType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("websocket".equals(discriminatorValue)) { + return WebSocketMediaStreamingOptionsInternal.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static MediaStreamingOptionsInternal fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { MediaStreamingOptionsInternal deserializedMediaStreamingOptionsInternal = new MediaStreamingOptionsInternal(); @@ -260,26 +128,12 @@ public static MediaStreamingOptionsInternal fromJson(JsonReader jsonReader) thro String fieldName = reader.getFieldName(); reader.nextToken(); - if ("transportUrl".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.transportUrl = reader.getString(); - } else if ("transportType".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.transportType - = MediaStreamingTransportTypeInternal.fromString(reader.getString()); - } else if ("contentType".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.contentType - = MediaStreamingContentTypeInternal.fromString(reader.getString()); - } else if ("audioChannelType".equals(fieldName)) { + if ("audioChannelType".equals(fieldName)) { deserializedMediaStreamingOptionsInternal.audioChannelType = MediaStreamingAudioChannelTypeInternal.fromString(reader.getString()); - } else if ("startMediaStreaming".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.startMediaStreaming - = reader.getNullable(JsonReader::getBoolean); - } else if ("enableBidirectional".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.enableBidirectional - = reader.getNullable(JsonReader::getBoolean); - } else if ("audioFormat".equals(fieldName)) { - deserializedMediaStreamingOptionsInternal.audioFormat - = AudioFormatInternal.fromString(reader.getString()); + } else if ("transportType".equals(fieldName)) { + deserializedMediaStreamingOptionsInternal.transportType + = StreamingTransportTypeInternal.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingTransportTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingTransportTypeInternal.java index 91d5e8d0ec83..3ed5d2057bdb 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingTransportTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MediaStreamingTransportTypeInternal.java @@ -4,7 +4,6 @@ package com.azure.communication.callautomation.implementation.models; -import com.azure.core.annotation.Generated; import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; @@ -16,7 +15,6 @@ public final class MediaStreamingTransportTypeInternal /** * Static value websocket for MediaStreamingTransportTypeInternal. */ - @Generated public static final MediaStreamingTransportTypeInternal WEBSOCKET = fromString("websocket"); /** @@ -24,7 +22,6 @@ public final class MediaStreamingTransportTypeInternal * * @deprecated Use the {@link #fromString(String)} factory method. */ - @Generated @Deprecated public MediaStreamingTransportTypeInternal() { } @@ -35,7 +32,6 @@ public MediaStreamingTransportTypeInternal() { * @param name a name to look for. * @return the corresponding MediaStreamingTransportTypeInternal. */ - @Generated public static MediaStreamingTransportTypeInternal fromString(String name) { return fromString(name, MediaStreamingTransportTypeInternal.class); } @@ -45,7 +41,6 @@ public static MediaStreamingTransportTypeInternal fromString(String name) { * * @return known MediaStreamingTransportTypeInternal values. */ - @Generated public static Collection values() { return values(MediaStreamingTransportTypeInternal.class); } 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 98fff65bda2b..983ccd3ebba3 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 @@ -18,7 +18,7 @@ @Fluent public final class MicrosoftTeamsUserIdentifierModel implements JsonSerializable { /* - * The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of the user. + * The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user. */ @Generated private String userId; @@ -43,8 +43,8 @@ public MicrosoftTeamsUserIdentifierModel() { } /** - * Get the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of - * the user. + * 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. */ @@ -54,8 +54,8 @@ public String getUserId() { } /** - * Set the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of - * the user. + * 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. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantFailed.java deleted file mode 100644 index 2ea012830424..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantFailed.java +++ /dev/null @@ -1,282 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Moving the participant failed event. - */ -@Fluent -public final class MoveParticipantFailed implements JsonSerializable { - /* - * The CallConnectionId for the call you want to move the participant from - */ - @Generated - private String fromCall; - - /* - * Call connection ID. - */ - @Generated - private String callConnectionId; - - /* - * Server call ID. - */ - @Generated - private String serverCallId; - - /* - * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. - */ - @Generated - private String correlationId; - - /* - * Used by customers when calling mid-call actions to correlate the request to the response event. - */ - @Generated - private String operationContext; - - /* - * Contains the resulting SIP code, sub-code and message. - */ - @Generated - private ResultInformation resultInformation; - - /* - * Participant - */ - @Generated - private CommunicationIdentifierModel participant; - - /** - * Creates an instance of MoveParticipantFailed class. - */ - @Generated - public MoveParticipantFailed() { - } - - /** - * Get the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @return the fromCall value. - */ - @Generated - public String getFromCall() { - return this.fromCall; - } - - /** - * Set the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @param fromCall the fromCall value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setFromCall(String fromCall) { - this.fromCall = fromCall; - return this; - } - - /** - * Get the callConnectionId property: Call connection ID. - * - * @return the callConnectionId value. - */ - @Generated - public String getCallConnectionId() { - return this.callConnectionId; - } - - /** - * Set the callConnectionId property: Call connection ID. - * - * @param callConnectionId the callConnectionId value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setCallConnectionId(String callConnectionId) { - this.callConnectionId = callConnectionId; - return this; - } - - /** - * Get the serverCallId property: Server call ID. - * - * @return the serverCallId value. - */ - @Generated - public String getServerCallId() { - return this.serverCallId; - } - - /** - * Set the serverCallId property: Server call ID. - * - * @param serverCallId the serverCallId value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed 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. - */ - @Generated - 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 MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setCorrelationId(String correlationId) { - this.correlationId = correlationId; - return this; - } - - /** - * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @return the operationContext value. - */ - @Generated - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @param operationContext the operationContext value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } - - /** - * Get the resultInformation property: Contains the resulting SIP code, sub-code and message. - * - * @return the resultInformation value. - */ - @Generated - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Set the resultInformation property: Contains the resulting SIP code, sub-code and message. - * - * @param resultInformation the resultInformation value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setResultInformation(ResultInformation resultInformation) { - this.resultInformation = resultInformation; - return this; - } - - /** - * Get the participant property: Participant. - * - * @return the participant value. - */ - @Generated - public CommunicationIdentifierModel getParticipant() { - return this.participant; - } - - /** - * Set the participant property: Participant. - * - * @param participant the participant value to set. - * @return the MoveParticipantFailed object itself. - */ - @Generated - public MoveParticipantFailed setParticipant(CommunicationIdentifierModel participant) { - this.participant = participant; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fromCall", this.fromCall); - jsonWriter.writeStringField("callConnectionId", this.callConnectionId); - jsonWriter.writeStringField("serverCallId", this.serverCallId); - jsonWriter.writeStringField("correlationId", this.correlationId); - jsonWriter.writeStringField("operationContext", this.operationContext); - jsonWriter.writeJsonField("resultInformation", this.resultInformation); - jsonWriter.writeJsonField("participant", this.participant); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MoveParticipantFailed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MoveParticipantFailed if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MoveParticipantFailed. - */ - @Generated - public static MoveParticipantFailed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MoveParticipantFailed deserializedMoveParticipantFailed = new MoveParticipantFailed(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fromCall".equals(fieldName)) { - deserializedMoveParticipantFailed.fromCall = reader.getString(); - } else if ("callConnectionId".equals(fieldName)) { - deserializedMoveParticipantFailed.callConnectionId = reader.getString(); - } else if ("serverCallId".equals(fieldName)) { - deserializedMoveParticipantFailed.serverCallId = reader.getString(); - } else if ("correlationId".equals(fieldName)) { - deserializedMoveParticipantFailed.correlationId = reader.getString(); - } else if ("operationContext".equals(fieldName)) { - deserializedMoveParticipantFailed.operationContext = reader.getString(); - } else if ("resultInformation".equals(fieldName)) { - deserializedMoveParticipantFailed.resultInformation = ResultInformation.fromJson(reader); - } else if ("participant".equals(fieldName)) { - deserializedMoveParticipantFailed.participant = CommunicationIdentifierModel.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMoveParticipantFailed; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantSucceeded.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantSucceeded.java deleted file mode 100644 index 785927a2a81d..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantSucceeded.java +++ /dev/null @@ -1,282 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Moving the participant successfully event. - */ -@Fluent -public final class MoveParticipantSucceeded implements JsonSerializable { - /* - * The CallConnectionId for the call you want to move the participant from - */ - @Generated - private String fromCall; - - /* - * Call connection ID. - */ - @Generated - private String callConnectionId; - - /* - * Server call ID. - */ - @Generated - private String serverCallId; - - /* - * Correlation ID for event to call correlation. Also called ChainId for skype chain ID. - */ - @Generated - private String correlationId; - - /* - * Used by customers when calling mid-call actions to correlate the request to the response event. - */ - @Generated - private String operationContext; - - /* - * Contains the resulting SIP code, sub-code and message. - */ - @Generated - private ResultInformation resultInformation; - - /* - * Participant - */ - @Generated - private CommunicationIdentifierModel participant; - - /** - * Creates an instance of MoveParticipantSucceeded class. - */ - @Generated - public MoveParticipantSucceeded() { - } - - /** - * Get the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @return the fromCall value. - */ - @Generated - public String getFromCall() { - return this.fromCall; - } - - /** - * Set the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @param fromCall the fromCall value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setFromCall(String fromCall) { - this.fromCall = fromCall; - return this; - } - - /** - * Get the callConnectionId property: Call connection ID. - * - * @return the callConnectionId value. - */ - @Generated - public String getCallConnectionId() { - return this.callConnectionId; - } - - /** - * Set the callConnectionId property: Call connection ID. - * - * @param callConnectionId the callConnectionId value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setCallConnectionId(String callConnectionId) { - this.callConnectionId = callConnectionId; - return this; - } - - /** - * Get the serverCallId property: Server call ID. - * - * @return the serverCallId value. - */ - @Generated - public String getServerCallId() { - return this.serverCallId; - } - - /** - * Set the serverCallId property: Server call ID. - * - * @param serverCallId the serverCallId value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded 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. - */ - @Generated - 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 MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setCorrelationId(String correlationId) { - this.correlationId = correlationId; - return this; - } - - /** - * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @return the operationContext value. - */ - @Generated - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @param operationContext the operationContext value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } - - /** - * Get the resultInformation property: Contains the resulting SIP code, sub-code and message. - * - * @return the resultInformation value. - */ - @Generated - public ResultInformation getResultInformation() { - return this.resultInformation; - } - - /** - * Set the resultInformation property: Contains the resulting SIP code, sub-code and message. - * - * @param resultInformation the resultInformation value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setResultInformation(ResultInformation resultInformation) { - this.resultInformation = resultInformation; - return this; - } - - /** - * Get the participant property: Participant. - * - * @return the participant value. - */ - @Generated - public CommunicationIdentifierModel getParticipant() { - return this.participant; - } - - /** - * Set the participant property: Participant. - * - * @param participant the participant value to set. - * @return the MoveParticipantSucceeded object itself. - */ - @Generated - public MoveParticipantSucceeded setParticipant(CommunicationIdentifierModel participant) { - this.participant = participant; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("fromCall", this.fromCall); - jsonWriter.writeStringField("callConnectionId", this.callConnectionId); - jsonWriter.writeStringField("serverCallId", this.serverCallId); - jsonWriter.writeStringField("correlationId", this.correlationId); - jsonWriter.writeStringField("operationContext", this.operationContext); - jsonWriter.writeJsonField("resultInformation", this.resultInformation); - jsonWriter.writeJsonField("participant", this.participant); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MoveParticipantSucceeded from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MoveParticipantSucceeded if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MoveParticipantSucceeded. - */ - @Generated - public static MoveParticipantSucceeded fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MoveParticipantSucceeded deserializedMoveParticipantSucceeded = new MoveParticipantSucceeded(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fromCall".equals(fieldName)) { - deserializedMoveParticipantSucceeded.fromCall = reader.getString(); - } else if ("callConnectionId".equals(fieldName)) { - deserializedMoveParticipantSucceeded.callConnectionId = reader.getString(); - } else if ("serverCallId".equals(fieldName)) { - deserializedMoveParticipantSucceeded.serverCallId = reader.getString(); - } else if ("correlationId".equals(fieldName)) { - deserializedMoveParticipantSucceeded.correlationId = reader.getString(); - } else if ("operationContext".equals(fieldName)) { - deserializedMoveParticipantSucceeded.operationContext = reader.getString(); - } else if ("resultInformation".equals(fieldName)) { - deserializedMoveParticipantSucceeded.resultInformation = ResultInformation.fromJson(reader); - } else if ("participant".equals(fieldName)) { - deserializedMoveParticipantSucceeded.participant = CommunicationIdentifierModel.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedMoveParticipantSucceeded; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsRequest.java deleted file mode 100644 index efd5155c9cef..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsRequest.java +++ /dev/null @@ -1,197 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The request payload for moving participant to the call. - */ -@Fluent -public final class MoveParticipantsRequest implements JsonSerializable { - /* - * The participant to Move. - */ - @Generated - private List targetParticipants; - - /* - * Used by customers when calling mid-call actions to correlate the request to the response event. - */ - @Generated - private String operationContext; - - /* - * Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. - * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. - */ - @Generated - private String operationCallbackUri; - - /* - * The CallConnectionId for the call you want to move the participant from - */ - @Generated - private String fromCall; - - /** - * Creates an instance of MoveParticipantsRequest class. - */ - @Generated - public MoveParticipantsRequest() { - } - - /** - * Get the targetParticipants property: The participant to Move. - * - * @return the targetParticipants value. - */ - @Generated - public List getTargetParticipants() { - return this.targetParticipants; - } - - /** - * Set the targetParticipants property: The participant to Move. - * - * @param targetParticipants the targetParticipants value to set. - * @return the MoveParticipantsRequest object itself. - */ - @Generated - public MoveParticipantsRequest setTargetParticipants(List targetParticipants) { - this.targetParticipants = targetParticipants; - return this; - } - - /** - * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @return the operationContext value. - */ - @Generated - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to - * the response event. - * - * @param operationContext the operationContext value to set. - * @return the MoveParticipantsRequest object itself. - */ - @Generated - public MoveParticipantsRequest setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } - - /** - * Get the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by - * CreateCall/AnswerCall for this operation. - * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. - * - * @return the operationCallbackUri value. - */ - @Generated - public String getOperationCallbackUri() { - return this.operationCallbackUri; - } - - /** - * Set the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by - * CreateCall/AnswerCall for this operation. - * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. - * - * @param operationCallbackUri the operationCallbackUri value to set. - * @return the MoveParticipantsRequest object itself. - */ - @Generated - public MoveParticipantsRequest setOperationCallbackUri(String operationCallbackUri) { - this.operationCallbackUri = operationCallbackUri; - return this; - } - - /** - * Get the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @return the fromCall value. - */ - @Generated - public String getFromCall() { - return this.fromCall; - } - - /** - * Set the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @param fromCall the fromCall value to set. - * @return the MoveParticipantsRequest object itself. - */ - @Generated - public MoveParticipantsRequest setFromCall(String fromCall) { - this.fromCall = fromCall; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("targetParticipants", this.targetParticipants, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("fromCall", this.fromCall); - jsonWriter.writeStringField("operationContext", this.operationContext); - jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MoveParticipantsRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MoveParticipantsRequest if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the MoveParticipantsRequest. - */ - @Generated - public static MoveParticipantsRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MoveParticipantsRequest deserializedMoveParticipantsRequest = new MoveParticipantsRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetParticipants".equals(fieldName)) { - List targetParticipants - = reader.readArray(reader1 -> CommunicationIdentifierModel.fromJson(reader1)); - deserializedMoveParticipantsRequest.targetParticipants = targetParticipants; - } else if ("fromCall".equals(fieldName)) { - deserializedMoveParticipantsRequest.fromCall = reader.getString(); - } else if ("operationContext".equals(fieldName)) { - deserializedMoveParticipantsRequest.operationContext = reader.getString(); - } else if ("operationCallbackUri".equals(fieldName)) { - deserializedMoveParticipantsRequest.operationCallbackUri = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMoveParticipantsRequest; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsResponse.java deleted file mode 100644 index bcbb6a315f3f..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/MoveParticipantsResponse.java +++ /dev/null @@ -1,157 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The response payload for moving participants to the call. - */ -@Fluent -public final class MoveParticipantsResponse implements JsonSerializable { - /* - * List of current participants in the call. - */ - @Generated - private List participants; - - /* - * The operation context provided by client. - */ - @Generated - private String operationContext; - - /* - * The CallConnectionId for the call you want to move the participant from - */ - @Generated - private String fromCall; - - /** - * Creates an instance of MoveParticipantsResponse class. - */ - @Generated - public MoveParticipantsResponse() { - } - - /** - * Get the participants property: List of current participants in the call. - * - * @return the participants value. - */ - @Generated - public List getParticipants() { - return this.participants; - } - - /** - * Set the participants property: List of current participants in the call. - * - * @param participants the participants value to set. - * @return the MoveParticipantsResponse object itself. - */ - @Generated - public MoveParticipantsResponse setParticipants(List participants) { - this.participants = participants; - return this; - } - - /** - * Get the operationContext property: The operation context provided by client. - * - * @return the operationContext value. - */ - @Generated - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property: The operation context provided by client. - * - * @param operationContext the operationContext value to set. - * @return the MoveParticipantsResponse object itself. - */ - @Generated - public MoveParticipantsResponse setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } - - /** - * Get the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @return the fromCall value. - */ - @Generated - public String getFromCall() { - return this.fromCall; - } - - /** - * Set the fromCall property: The CallConnectionId for the call you want to move the participant from. - * - * @param fromCall the fromCall value to set. - * @return the MoveParticipantsResponse object itself. - */ - @Generated - public MoveParticipantsResponse setFromCall(String fromCall) { - this.fromCall = fromCall; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("participants", this.participants, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("operationContext", this.operationContext); - jsonWriter.writeStringField("fromCall", this.fromCall); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MoveParticipantsResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MoveParticipantsResponse if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the MoveParticipantsResponse. - */ - @Generated - public static MoveParticipantsResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MoveParticipantsResponse deserializedMoveParticipantsResponse = new MoveParticipantsResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("participants".equals(fieldName)) { - List participants - = reader.readArray(reader1 -> CallParticipantInternal.fromJson(reader1)); - deserializedMoveParticipantsResponse.participants = participants; - } else if ("operationContext".equals(fieldName)) { - deserializedMoveParticipantsResponse.operationContext = reader.getString(); - } else if ("fromCall".equals(fieldName)) { - deserializedMoveParticipantsResponse.fromCall = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedMoveParticipantsResponse; - }); - } -} 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 8c6a1427ed7d..c2539c22fadd 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 @@ -18,25 +18,11 @@ @Fluent public final class PhoneNumberIdentifierModel implements JsonSerializable { /* - * The phone number, usually in E.164 format. + * The phone number in E.164 format. */ @Generated private String value; - /* - * True if the phone number is anonymous. By default false if missing. If the phone number is anonymous, the value - * will be the string 'anonymous'. - */ - @Generated - private Boolean isAnonymous; - - /* - * The asserted Id of the phone number. An asserted Id gets generated when the same phone number joins the same call - * more than once. - */ - @Generated - private String assertedId; - /** * Creates an instance of PhoneNumberIdentifierModel class. */ @@ -45,7 +31,7 @@ public PhoneNumberIdentifierModel() { } /** - * Get the value property: The phone number, usually in E.164 format. + * Get the value property: The phone number in E.164 format. * * @return the value value. */ @@ -55,7 +41,7 @@ public String getValue() { } /** - * Set the value property: The phone number, usually in E.164 format. + * Set the value property: The phone number in E.164 format. * * @param value the value value to set. * @return the PhoneNumberIdentifierModel object itself. @@ -66,54 +52,6 @@ public PhoneNumberIdentifierModel setValue(String value) { return this; } - /** - * Get the isAnonymous property: True if the phone number is anonymous. By default false if missing. If the phone - * number is anonymous, the value will be the string 'anonymous'. - * - * @return the isAnonymous value. - */ - @Generated - public Boolean isAnonymous() { - return this.isAnonymous; - } - - /** - * Set the isAnonymous property: True if the phone number is anonymous. By default false if missing. If the phone - * number is anonymous, the value will be the string 'anonymous'. - * - * @param isAnonymous the isAnonymous value to set. - * @return the PhoneNumberIdentifierModel object itself. - */ - @Generated - public PhoneNumberIdentifierModel setIsAnonymous(Boolean isAnonymous) { - this.isAnonymous = isAnonymous; - return this; - } - - /** - * Get the assertedId property: The asserted Id of the phone number. An asserted Id gets generated when the same - * phone number joins the same call more than once. - * - * @return the assertedId value. - */ - @Generated - public String getAssertedId() { - return this.assertedId; - } - - /** - * Set the assertedId property: The asserted Id of the phone number. An asserted Id gets generated when the same - * phone number joins the same call more than once. - * - * @param assertedId the assertedId value to set. - * @return the PhoneNumberIdentifierModel object itself. - */ - @Generated - public PhoneNumberIdentifierModel setAssertedId(String assertedId) { - this.assertedId = assertedId; - return this; - } - /** * {@inheritDoc} */ @@ -122,8 +60,6 @@ public PhoneNumberIdentifierModel setAssertedId(String assertedId) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("value", this.value); - jsonWriter.writeBooleanField("isAnonymous", this.isAnonymous); - jsonWriter.writeStringField("assertedId", this.assertedId); return jsonWriter.writeEndObject(); } @@ -146,10 +82,6 @@ public static PhoneNumberIdentifierModel fromJson(JsonReader jsonReader) throws if ("value".equals(fieldName)) { deserializedPhoneNumberIdentifierModel.value = reader.getString(); - } else if ("isAnonymous".equals(fieldName)) { - deserializedPhoneNumberIdentifierModel.isAnonymous = reader.getNullable(JsonReader::getBoolean); - } else if ("assertedId".equals(fieldName)) { - deserializedPhoneNumberIdentifierModel.assertedId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java index 8ec7230acfae..6ac127b93f75 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PlayOptionsInternal.java @@ -23,19 +23,6 @@ public final class PlayOptionsInternal implements JsonSerializable { @Generated private List playTo; + /* + * If set play can barge into other existing queued-up/currently-processing requests. + */ + @Generated + private Boolean interruptCallMediaOperation; + /* * Defines options for playing the audio. */ @@ -103,6 +109,30 @@ public PlayRequest setPlayTo(List playTo) { return this; } + /** + * Get the interruptCallMediaOperation property: If set play can barge into other existing + * queued-up/currently-processing requests. + * + * @return the interruptCallMediaOperation value. + */ + @Generated + public Boolean isInterruptCallMediaOperation() { + return this.interruptCallMediaOperation; + } + + /** + * Set the interruptCallMediaOperation property: If set play can barge into other existing + * queued-up/currently-processing requests. + * + * @param interruptCallMediaOperation the interruptCallMediaOperation value to set. + * @return the PlayRequest object itself. + */ + @Generated + public PlayRequest setInterruptCallMediaOperation(Boolean interruptCallMediaOperation) { + this.interruptCallMediaOperation = interruptCallMediaOperation; + return this; + } + /** * Get the playOptions property: Defines options for playing the audio. * @@ -182,6 +212,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeArrayField("playSources", this.playSources, (writer, element) -> writer.writeJson(element)); jsonWriter.writeArrayField("playTo", this.playTo, (writer, element) -> writer.writeJson(element)); + jsonWriter.writeBooleanField("interruptCallMediaOperation", this.interruptCallMediaOperation); jsonWriter.writeJsonField("playOptions", this.playOptions); jsonWriter.writeStringField("operationContext", this.operationContext); jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); @@ -213,6 +244,8 @@ public static PlayRequest fromJson(JsonReader jsonReader) throws IOException { List playTo = reader.readArray(reader1 -> CommunicationIdentifierModel.fromJson(reader1)); deserializedPlayRequest.playTo = playTo; + } else if ("interruptCallMediaOperation".equals(fieldName)) { + deserializedPlayRequest.interruptCallMediaOperation = reader.getNullable(JsonReader::getBoolean); } else if ("playOptions".equals(fieldName)) { deserializedPlayRequest.playOptions = PlayOptionsInternal.fromJson(reader); } else if ("operationContext".equals(fieldName)) { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PostProcessingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PostProcessingOptions.java deleted file mode 100644 index 8494df573d20..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PostProcessingOptions.java +++ /dev/null @@ -1,160 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The PostProcessingOptions model. - */ -@Fluent -public final class PostProcessingOptions implements JsonSerializable { - /* - * The identifier of the Cognitive Service resource assigned to the post recording processing. - * The Cognitive Service resource will be used by the summarization feature. - */ - @Generated - private String cognitiveServicesEndpoint; - - /* - * Define options of the transcription for the post recording processing. - */ - @Generated - private Transcription transcription; - - /* - * Define options of the summarization for the post recording processing. - */ - @Generated - private Summarization summarization; - - /** - * Creates an instance of PostProcessingOptions class. - */ - @Generated - public PostProcessingOptions() { - } - - /** - * Get the cognitiveServicesEndpoint property: The identifier of the Cognitive Service resource assigned to the post - * recording processing. - * The Cognitive Service resource will be used by the summarization feature. - * - * @return the cognitiveServicesEndpoint value. - */ - @Generated - public String getCognitiveServicesEndpoint() { - return this.cognitiveServicesEndpoint; - } - - /** - * Set the cognitiveServicesEndpoint property: The identifier of the Cognitive Service resource assigned to the post - * recording processing. - * The Cognitive Service resource will be used by the summarization feature. - * - * @param cognitiveServicesEndpoint the cognitiveServicesEndpoint value to set. - * @return the PostProcessingOptions object itself. - */ - @Generated - public PostProcessingOptions setCognitiveServicesEndpoint(String cognitiveServicesEndpoint) { - this.cognitiveServicesEndpoint = cognitiveServicesEndpoint; - return this; - } - - /** - * Get the transcription property: Define options of the transcription for the post recording processing. - * - * @return the transcription value. - */ - @Generated - public Transcription getTranscription() { - return this.transcription; - } - - /** - * Set the transcription property: Define options of the transcription for the post recording processing. - * - * @param transcription the transcription value to set. - * @return the PostProcessingOptions object itself. - */ - @Generated - public PostProcessingOptions setTranscription(Transcription transcription) { - this.transcription = transcription; - return this; - } - - /** - * Get the summarization property: Define options of the summarization for the post recording processing. - * - * @return the summarization value. - */ - @Generated - public Summarization getSummarization() { - return this.summarization; - } - - /** - * Set the summarization property: Define options of the summarization for the post recording processing. - * - * @param summarization the summarization value to set. - * @return the PostProcessingOptions object itself. - */ - @Generated - public PostProcessingOptions setSummarization(Summarization summarization) { - this.summarization = summarization; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("transcription", this.transcription); - jsonWriter.writeStringField("cognitiveServicesEndpoint", this.cognitiveServicesEndpoint); - jsonWriter.writeJsonField("summarization", this.summarization); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PostProcessingOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PostProcessingOptions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PostProcessingOptions. - */ - @Generated - public static PostProcessingOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PostProcessingOptions deserializedPostProcessingOptions = new PostProcessingOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("transcription".equals(fieldName)) { - deserializedPostProcessingOptions.transcription = Transcription.fromJson(reader); - } else if ("cognitiveServicesEndpoint".equals(fieldName)) { - deserializedPostProcessingOptions.cognitiveServicesEndpoint = reader.getString(); - } else if ("summarization".equals(fieldName)) { - deserializedPostProcessingOptions.summarization = Summarization.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPostProcessingOptions; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PowerVirtualAgentsDialog.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PowerVirtualAgentsDialog.java index 227d91a2186d..43e7f30dfd13 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PowerVirtualAgentsDialog.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/PowerVirtualAgentsDialog.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; @@ -20,25 +19,21 @@ public final class PowerVirtualAgentsDialog extends BaseDialog { /* * Determines the type of the dialog. */ - @Generated private DialogInputType kind = DialogInputType.POWER_VIRTUAL_AGENTS; /* * Bot identifier. */ - @Generated private String botAppId; /* * Language. */ - @Generated private String language; /** * Creates an instance of PowerVirtualAgentsDialog class. */ - @Generated public PowerVirtualAgentsDialog() { } @@ -47,7 +42,6 @@ public PowerVirtualAgentsDialog() { * * @return the kind value. */ - @Generated @Override public DialogInputType getKind() { return this.kind; @@ -58,7 +52,6 @@ public DialogInputType getKind() { * * @return the botAppId value. */ - @Generated public String getBotAppId() { return this.botAppId; } @@ -69,7 +62,6 @@ public String getBotAppId() { * @param botAppId the botAppId value to set. * @return the PowerVirtualAgentsDialog object itself. */ - @Generated public PowerVirtualAgentsDialog setBotAppId(String botAppId) { this.botAppId = botAppId; return this; @@ -80,7 +72,6 @@ public PowerVirtualAgentsDialog setBotAppId(String botAppId) { * * @return the language value. */ - @Generated public String getLanguage() { return this.language; } @@ -91,7 +82,6 @@ public String getLanguage() { * @param language the language value to set. * @return the PowerVirtualAgentsDialog object itself. */ - @Generated public PowerVirtualAgentsDialog setLanguage(String language) { this.language = language; return this; @@ -100,7 +90,6 @@ public PowerVirtualAgentsDialog setLanguage(String language) { /** * {@inheritDoc} */ - @Generated @Override public PowerVirtualAgentsDialog setContext(Map context) { super.setContext(context); @@ -110,7 +99,6 @@ public PowerVirtualAgentsDialog setContext(Map context) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -130,7 +118,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the PowerVirtualAgentsDialog. */ - @Generated public static PowerVirtualAgentsDialog fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { PowerVirtualAgentsDialog deserializedPowerVirtualAgentsDialog = new PowerVirtualAgentsDialog(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingChunkStorageInfo.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingChunkStorageInfo.java index 714de6fb0d28..9d6c3e7c68fd 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingChunkStorageInfo.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingChunkStorageInfo.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,43 +19,36 @@ public final class RecordingChunkStorageInfo implements JsonSerializable { RecordingChunkStorageInfo deserializedRecordingChunkStorageInfo = new RecordingChunkStorageInfo(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingResultResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingResultResponse.java index 0ffdcfc561b2..a76635d792f3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingResultResponse.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingResultResponse.java @@ -4,9 +4,7 @@ package com.azure.communication.callautomation.implementation.models; -import com.azure.core.annotation.Generated; import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -23,49 +21,41 @@ public final class RecordingResultResponse implements JsonSerializable errors; /* * The recordingStartTime property. */ - @Generated private OffsetDateTime recordingStartTime; /* * The recordingDurationMs property. */ - @Generated private Long recordingDurationMs; /* * The sessionEndReason property. */ - @Generated private CallSessionEndReason sessionEndReason; /* * The recordingExpirationTime property. */ - @Generated private OffsetDateTime recordingExpirationTime; /** * Creates an instance of RecordingResultResponse class. */ - @Generated public RecordingResultResponse() { } @@ -74,7 +64,6 @@ public RecordingResultResponse() { * * @return the recordingId value. */ - @Generated public String getRecordingId() { return this.recordingId; } @@ -84,8 +73,7 @@ public String getRecordingId() { * * @return the recordingStorageInfo value. */ - @Generated - public RecordingStorageInfoInternal getRecordingStorageInfo() { + public RecordingStorageInfo getRecordingStorageInfo() { return this.recordingStorageInfo; } @@ -94,7 +82,6 @@ public RecordingStorageInfoInternal getRecordingStorageInfo() { * * @return the errors value. */ - @Generated public List getErrors() { return this.errors; } @@ -104,7 +91,6 @@ public List getErrors() { * * @return the recordingStartTime value. */ - @Generated public OffsetDateTime getRecordingStartTime() { return this.recordingStartTime; } @@ -114,7 +100,6 @@ public OffsetDateTime getRecordingStartTime() { * * @return the recordingDurationMs value. */ - @Generated public Long getRecordingDurationMs() { return this.recordingDurationMs; } @@ -124,7 +109,6 @@ public Long getRecordingDurationMs() { * * @return the sessionEndReason value. */ - @Generated public CallSessionEndReason getSessionEndReason() { return this.sessionEndReason; } @@ -134,7 +118,6 @@ public CallSessionEndReason getSessionEndReason() { * * @return the recordingExpirationTime value. */ - @Generated public OffsetDateTime getRecordingExpirationTime() { return this.recordingExpirationTime; } @@ -142,7 +125,6 @@ public OffsetDateTime getRecordingExpirationTime() { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -157,7 +139,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * was pointing to JSON null. * @throws IOException If an error occurs while reading the RecordingResultResponse. */ - @Generated public static RecordingResultResponse fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { RecordingResultResponse deserializedRecordingResultResponse = new RecordingResultResponse(); @@ -168,22 +149,21 @@ public static RecordingResultResponse fromJson(JsonReader jsonReader) throws IOE if ("recordingId".equals(fieldName)) { deserializedRecordingResultResponse.recordingId = reader.getString(); } else if ("recordingStorageInfo".equals(fieldName)) { - deserializedRecordingResultResponse.recordingStorageInfo - = RecordingStorageInfoInternal.fromJson(reader); + deserializedRecordingResultResponse.recordingStorageInfo = RecordingStorageInfo.fromJson(reader); } else if ("errors".equals(fieldName)) { List errors = reader.readArray(reader1 -> Error.fromJson(reader1)); deserializedRecordingResultResponse.errors = errors; } else if ("recordingStartTime".equals(fieldName)) { - deserializedRecordingResultResponse.recordingStartTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedRecordingResultResponse.recordingStartTime + = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); } else if ("recordingDurationMs".equals(fieldName)) { deserializedRecordingResultResponse.recordingDurationMs = reader.getNullable(JsonReader::getLong); } else if ("sessionEndReason".equals(fieldName)) { deserializedRecordingResultResponse.sessionEndReason = CallSessionEndReason.fromString(reader.getString()); } else if ("recordingExpirationTime".equals(fieldName)) { - deserializedRecordingResultResponse.recordingExpirationTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); + deserializedRecordingResultResponse.recordingExpirationTime + = reader.getNullable(nonNullReader -> OffsetDateTime.parse(nonNullReader.getString())); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfo.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfo.java index 60961bfbada2..581e9e8bfdd4 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfo.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfo.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -19,17 +18,13 @@ @Fluent public final class RecordingStorageInfo implements JsonSerializable { /* - * Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts. - * ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo} + * Collection of {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo} */ - @Generated private List recordingChunks; /** * Creates an instance of RecordingStorageInfo class. */ - @Generated public RecordingStorageInfo() { } @@ -39,7 +34,6 @@ public RecordingStorageInfo() { * * @return the recordingChunks value. */ - @Generated public List getRecordingChunks() { return this.recordingChunks; } @@ -51,7 +45,6 @@ public List getRecordingChunks() { * @param recordingChunks the recordingChunks value to set. * @return the RecordingStorageInfo object itself. */ - @Generated public RecordingStorageInfo setRecordingChunks(List recordingChunks) { this.recordingChunks = recordingChunks; return this; @@ -60,7 +53,6 @@ public RecordingStorageInfo setRecordingChunks(List r /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -77,7 +69,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * was pointing to JSON null. * @throws IOException If an error occurs while reading the RecordingStorageInfo. */ - @Generated public static RecordingStorageInfo fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { RecordingStorageInfo deserializedRecordingStorageInfo = new RecordingStorageInfo(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfoInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfoInternal.java deleted file mode 100644 index ff959d5a66bb..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStorageInfoInternal.java +++ /dev/null @@ -1,100 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container for chunks. - */ -@Fluent -public final class RecordingStorageInfoInternal implements JsonSerializable { - /* - * Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts. - * ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo} - */ - @Generated - private List recordingChunks; - - /** - * Creates an instance of RecordingStorageInfoInternal class. - */ - @Generated - public RecordingStorageInfoInternal() { - } - - /** - * Get the recordingChunks property: Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo}. - * - * @return the recordingChunks value. - */ - @Generated - public List getRecordingChunks() { - return this.recordingChunks; - } - - /** - * Set the recordingChunks property: Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo}. - * - * @param recordingChunks the recordingChunks value to set. - * @return the RecordingStorageInfoInternal object itself. - */ - @Generated - public RecordingStorageInfoInternal setRecordingChunks(List recordingChunks) { - this.recordingChunks = recordingChunks; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("recordingChunks", this.recordingChunks, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecordingStorageInfoInternal from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecordingStorageInfoInternal if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecordingStorageInfoInternal. - */ - @Generated - public static RecordingStorageInfoInternal fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecordingStorageInfoInternal deserializedRecordingStorageInfoInternal = new RecordingStorageInfoInternal(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recordingChunks".equals(fieldName)) { - List recordingChunks - = reader.readArray(reader1 -> RecordingChunkStorageInfo.fromJson(reader1)); - deserializedRecordingStorageInfoInternal.recordingChunks = recordingChunks; - } else { - reader.skipChildren(); - } - } - - return deserializedRecordingStorageInfoInternal; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java index f4653583ab0a..beb6d115c980 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RedirectCallRequestInternal.java @@ -29,12 +29,6 @@ public final class RedirectCallRequestInternal implements JsonSerializable { /* - * The call locator. (Only one of callLocator or callConnectionId to be used) + * The call locator. */ @Generated private CallLocatorInternal callLocator; - /* - * The call connectionId. (Only one of callLocator or callConnectionId to be used) - */ - @Generated - private String callConnectionId; - /* * The uri to send notifications to. */ @@ -85,12 +79,6 @@ public final class StartCallRecordingRequestInternal implements JsonSerializable @Generated private RecordingStorageInternal externalStorage; - /* - * The post processing options for the recording. - */ - @Generated - private PostProcessingOptions postProcessingOptions; - /** * Creates an instance of StartCallRecordingRequestInternal class. */ @@ -99,7 +87,7 @@ public StartCallRecordingRequestInternal() { } /** - * Get the callLocator property: The call locator. (Only one of callLocator or callConnectionId to be used). + * Get the callLocator property: The call locator. * * @return the callLocator value. */ @@ -109,7 +97,7 @@ public CallLocatorInternal getCallLocator() { } /** - * Set the callLocator property: The call locator. (Only one of callLocator or callConnectionId to be used). + * Set the callLocator property: The call locator. * * @param callLocator the callLocator value to set. * @return the StartCallRecordingRequestInternal object itself. @@ -120,30 +108,6 @@ public StartCallRecordingRequestInternal setCallLocator(CallLocatorInternal call return this; } - /** - * Get the callConnectionId property: The call connectionId. (Only one of callLocator or callConnectionId to be - * used). - * - * @return the callConnectionId value. - */ - @Generated - public String getCallConnectionId() { - return this.callConnectionId; - } - - /** - * Set the callConnectionId property: The call connectionId. (Only one of callLocator or callConnectionId to be - * used). - * - * @param callConnectionId the callConnectionId value to set. - * @return the StartCallRecordingRequestInternal object itself. - */ - @Generated - public StartCallRecordingRequestInternal setCallConnectionId(String callConnectionId) { - this.callConnectionId = callConnectionId; - return this; - } - /** * Get the recordingStateCallbackUri property: The uri to send notifications to. * @@ -337,28 +301,6 @@ public StartCallRecordingRequestInternal setExternalStorage(RecordingStorageInte return this; } - /** - * Get the postProcessingOptions property: The post processing options for the recording. - * - * @return the postProcessingOptions value. - */ - @Generated - public PostProcessingOptions getPostProcessingOptions() { - return this.postProcessingOptions; - } - - /** - * Set the postProcessingOptions property: The post processing options for the recording. - * - * @param postProcessingOptions the postProcessingOptions value to set. - * @return the StartCallRecordingRequestInternal object itself. - */ - @Generated - public StartCallRecordingRequestInternal setPostProcessingOptions(PostProcessingOptions postProcessingOptions) { - this.postProcessingOptions = postProcessingOptions; - return this; - } - /** * {@inheritDoc} */ @@ -367,7 +309,6 @@ public StartCallRecordingRequestInternal setPostProcessingOptions(PostProcessing public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("callLocator", this.callLocator); - jsonWriter.writeStringField("callConnectionId", this.callConnectionId); jsonWriter.writeStringField("recordingStateCallbackUri", this.recordingStateCallbackUri); jsonWriter.writeStringField("recordingContentType", this.recordingContentType == null ? null : this.recordingContentType.toString()); @@ -381,7 +322,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { (writer, element) -> writer.writeJson(element)); jsonWriter.writeBooleanField("pauseOnStart", this.pauseOnStart); jsonWriter.writeJsonField("externalStorage", this.externalStorage); - jsonWriter.writeJsonField("postProcessingOptions", this.postProcessingOptions); return jsonWriter.writeEndObject(); } @@ -391,6 +331,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @param jsonReader The JsonReader being read. * @return An instance of StartCallRecordingRequestInternal if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the StartCallRecordingRequestInternal. */ @Generated @@ -404,8 +345,6 @@ public static StartCallRecordingRequestInternal fromJson(JsonReader jsonReader) if ("callLocator".equals(fieldName)) { deserializedStartCallRecordingRequestInternal.callLocator = CallLocatorInternal.fromJson(reader); - } else if ("callConnectionId".equals(fieldName)) { - deserializedStartCallRecordingRequestInternal.callConnectionId = reader.getString(); } else if ("recordingStateCallbackUri".equals(fieldName)) { deserializedStartCallRecordingRequestInternal.recordingStateCallbackUri = reader.getString(); } else if ("recordingContentType".equals(fieldName)) { @@ -432,9 +371,6 @@ public static StartCallRecordingRequestInternal fromJson(JsonReader jsonReader) } else if ("externalStorage".equals(fieldName)) { deserializedStartCallRecordingRequestInternal.externalStorage = RecordingStorageInternal.fromJson(reader); - } else if ("postProcessingOptions".equals(fieldName)) { - deserializedStartCallRecordingRequestInternal.postProcessingOptions - = PostProcessingOptions.fromJson(reader); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartDialogRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartDialogRequestInternal.java index 3af194db0d60..e1959abf0fbe 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartDialogRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartDialogRequestInternal.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,26 +19,22 @@ public final class StartDialogRequestInternal implements JsonSerializable { StartDialogRequestInternal deserializedStartDialogRequestInternal = new StartDialogRequestInternal(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartRecordingFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartRecordingFailed.java index 8eac68dc4e67..fa756feab460 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartRecordingFailed.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartRecordingFailed.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,25 +19,21 @@ public final class StartRecordingFailed implements JsonSerializable { StartRecordingFailed deserializedStartRecordingFailed = new StartRecordingFailed(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java index 7b9695c7380a..4beb4e1ed01f 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequestInternal.java @@ -18,13 +18,14 @@ @Fluent public final class StartTranscriptionRequestInternal implements JsonSerializable { /* - * Defines Locale for the transcription e,g en-US + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ @Generated private String locale; /* - * Endpoint where the custom model was deployed. + * The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. */ @Generated private String speechModelEndpointId; @@ -50,7 +51,7 @@ public StartTranscriptionRequestInternal() { } /** - * Get the locale property: Defines Locale for the transcription e,g en-US. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -60,7 +61,7 @@ public String getLocale() { } /** - * Set the locale property: Defines Locale for the transcription e,g en-US. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the StartTranscriptionRequestInternal object itself. @@ -72,7 +73,8 @@ public StartTranscriptionRequestInternal setLocale(String locale) { } /** - * Get the speechModelEndpointId property: Endpoint where the custom model was deployed. + * Get the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. * * @return the speechModelEndpointId value. */ @@ -82,7 +84,8 @@ public String getSpeechModelEndpointId() { } /** - * Set the speechModelEndpointId property: Endpoint where the custom model was deployed. + * Set the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. * * @param speechModelEndpointId the speechModelEndpointId value to set. * @return the StartTranscriptionRequestInternal object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportTypeInternal.java new file mode 100644 index 000000000000..b3d97a0718a9 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StreamingTransportTypeInternal.java @@ -0,0 +1,52 @@ +// 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.Generated; +import com.azure.core.util.ExpandableStringEnum; +import java.util.Collection; + +/** + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. + */ +public final class StreamingTransportTypeInternal extends ExpandableStringEnum { + /** + * Static value websocket for StreamingTransportTypeInternal. + */ + @Generated + public static final StreamingTransportTypeInternal WEBSOCKET = fromString("websocket"); + + /** + * Creates a new instance of StreamingTransportTypeInternal value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Generated + @Deprecated + public StreamingTransportTypeInternal() { + } + + /** + * Creates or finds a StreamingTransportTypeInternal from its string representation. + * + * @param name a name to look for. + * @return the corresponding StreamingTransportTypeInternal. + */ + @Generated + public static StreamingTransportTypeInternal fromString(String name) { + return fromString(name, StreamingTransportTypeInternal.class); + } + + /** + * Gets known StreamingTransportTypeInternal values. + * + * @return known StreamingTransportTypeInternal values. + */ + @Generated + public static Collection values() { + return values(StreamingTransportTypeInternal.class); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Summarization.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Summarization.java deleted file mode 100644 index 2df1b5ac39b4..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Summarization.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Summarization model. - */ -@Fluent -public final class Summarization implements JsonSerializable { - /* - * Determine if the summarization should be enabled for the post recording processing. - */ - @Generated - private boolean enableSummarization; - - /** - * Creates an instance of Summarization class. - */ - @Generated - public Summarization() { - } - - /** - * Get the enableSummarization property: Determine if the summarization should be enabled for the post recording - * processing. - * - * @return the enableSummarization value. - */ - @Generated - public boolean isEnableSummarization() { - return this.enableSummarization; - } - - /** - * Set the enableSummarization property: Determine if the summarization should be enabled for the post recording - * processing. - * - * @param enableSummarization the enableSummarization value to set. - * @return the Summarization object itself. - */ - @Generated - public Summarization setEnableSummarization(boolean enableSummarization) { - this.enableSummarization = enableSummarization; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableSummarization", this.enableSummarization); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Summarization from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Summarization if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Summarization. - */ - @Generated - public static Summarization fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Summarization deserializedSummarization = new Summarization(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableSummarization".equals(fieldName)) { - deserializedSummarization.enableSummarization = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedSummarization; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsExtensionUserIdentifierModel.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsExtensionUserIdentifierModel.java deleted file mode 100644 index 7e39e76a691b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsExtensionUserIdentifierModel.java +++ /dev/null @@ -1,190 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A Microsoft Teams Phone user who is using a Communication Services resource to extend their Teams Phone set up. - */ -@Fluent -public final class TeamsExtensionUserIdentifierModel implements JsonSerializable { - /* - * The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user. - */ - @Generated - private String userId; - - /* - * The tenant Id of the Microsoft Teams Extension user. - */ - @Generated - private String tenantId; - - /* - * The Communication Services resource Id. - */ - @Generated - private String resourceId; - - /* - * The cloud that the Microsoft Teams Extension user belongs to. By default 'public' if missing. - */ - @Generated - private CommunicationCloudEnvironmentModel cloud; - - /** - * Creates an instance of TeamsExtensionUserIdentifierModel class. - */ - @Generated - public TeamsExtensionUserIdentifierModel() { - } - - /** - * Get the userId property: The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user. - * - * @return the userId value. - */ - @Generated - public String getUserId() { - return this.userId; - } - - /** - * Set the userId property: The Id of the Microsoft Teams Extension user, i.e. the Entra ID object Id of the user. - * - * @param userId the userId value to set. - * @return the TeamsExtensionUserIdentifierModel object itself. - */ - @Generated - public TeamsExtensionUserIdentifierModel setUserId(String userId) { - this.userId = userId; - return this; - } - - /** - * Get the tenantId property: The tenant Id of the Microsoft Teams Extension user. - * - * @return the tenantId value. - */ - @Generated - public String getTenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: The tenant Id of the Microsoft Teams Extension user. - * - * @param tenantId the tenantId value to set. - * @return the TeamsExtensionUserIdentifierModel object itself. - */ - @Generated - public TeamsExtensionUserIdentifierModel setTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the resourceId property: The Communication Services resource Id. - * - * @return the resourceId value. - */ - @Generated - public String getResourceId() { - return this.resourceId; - } - - /** - * Set the resourceId property: The Communication Services resource Id. - * - * @param resourceId the resourceId value to set. - * @return the TeamsExtensionUserIdentifierModel object itself. - */ - @Generated - public TeamsExtensionUserIdentifierModel setResourceId(String resourceId) { - this.resourceId = resourceId; - return this; - } - - /** - * Get the cloud property: The cloud that the Microsoft Teams Extension user belongs to. By default 'public' if - * missing. - * - * @return the cloud value. - */ - @Generated - public CommunicationCloudEnvironmentModel getCloud() { - return this.cloud; - } - - /** - * Set the cloud property: The cloud that the Microsoft Teams Extension user belongs to. By default 'public' if - * missing. - * - * @param cloud the cloud value to set. - * @return the TeamsExtensionUserIdentifierModel object itself. - */ - @Generated - public TeamsExtensionUserIdentifierModel setCloud(CommunicationCloudEnvironmentModel cloud) { - this.cloud = cloud; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("userId", this.userId); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("resourceId", this.resourceId); - jsonWriter.writeStringField("cloud", this.cloud == null ? null : this.cloud.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TeamsExtensionUserIdentifierModel from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TeamsExtensionUserIdentifierModel if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TeamsExtensionUserIdentifierModel. - */ - @Generated - public static TeamsExtensionUserIdentifierModel fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TeamsExtensionUserIdentifierModel deserializedTeamsExtensionUserIdentifierModel - = new TeamsExtensionUserIdentifierModel(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("userId".equals(fieldName)) { - deserializedTeamsExtensionUserIdentifierModel.userId = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedTeamsExtensionUserIdentifierModel.tenantId = reader.getString(); - } else if ("resourceId".equals(fieldName)) { - deserializedTeamsExtensionUserIdentifierModel.resourceId = reader.getString(); - } else if ("cloud".equals(fieldName)) { - deserializedTeamsExtensionUserIdentifierModel.cloud - = CommunicationCloudEnvironmentModel.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedTeamsExtensionUserIdentifierModel; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallDetails.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallDetails.java deleted file mode 100644 index 682483cf1ac9..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallDetails.java +++ /dev/null @@ -1,352 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The call details which will be sent to the target. - */ -@Fluent -public final class TeamsPhoneCallDetails implements JsonSerializable { - /* - * Container for details relating to the original caller of the call - */ - @Generated - private TeamsPhoneCallerDetails teamsPhoneCallerDetails; - - /* - * Container for details relating to the entity responsible for the creation of these call details - */ - @Generated - private TeamsPhoneSourceDetails teamsPhoneSourceDetails; - - /* - * Id to exclusively identify this call session. IVR will use this for their telemetry/reporting. - */ - @Generated - private String sessionId; - - /* - * The intent of the call - */ - @Generated - private String intent; - - /* - * A very short description (max 48 chars) of the reason for the call. To be displayed in Teams CallNotification - */ - @Generated - private String callTopic; - - /* - * A summary of the call thus far. It will be displayed on a side panel in the Teams UI - */ - @Generated - private String callContext; - - /* - * Url for fetching the transcript of the call - */ - @Generated - private String transcriptUrl; - - /* - * Sentiment of the call thus far - */ - @Generated - private String callSentiment; - - /* - * Recommendations for resolving the issue based on the customer’s intent and interaction history - */ - @Generated - private String suggestedActions; - - /** - * Creates an instance of TeamsPhoneCallDetails class. - */ - @Generated - public TeamsPhoneCallDetails() { - } - - /** - * Get the teamsPhoneCallerDetails property: Container for details relating to the original caller of the call. - * - * @return the teamsPhoneCallerDetails value. - */ - @Generated - public TeamsPhoneCallerDetails getTeamsPhoneCallerDetails() { - return this.teamsPhoneCallerDetails; - } - - /** - * Set the teamsPhoneCallerDetails property: Container for details relating to the original caller of the call. - * - * @param teamsPhoneCallerDetails the teamsPhoneCallerDetails value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setTeamsPhoneCallerDetails(TeamsPhoneCallerDetails teamsPhoneCallerDetails) { - this.teamsPhoneCallerDetails = teamsPhoneCallerDetails; - return this; - } - - /** - * Get the teamsPhoneSourceDetails property: Container for details relating to the entity responsible for the - * creation of these call details. - * - * @return the teamsPhoneSourceDetails value. - */ - @Generated - public TeamsPhoneSourceDetails getTeamsPhoneSourceDetails() { - return this.teamsPhoneSourceDetails; - } - - /** - * Set the teamsPhoneSourceDetails property: Container for details relating to the entity responsible for the - * creation of these call details. - * - * @param teamsPhoneSourceDetails the teamsPhoneSourceDetails value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setTeamsPhoneSourceDetails(TeamsPhoneSourceDetails teamsPhoneSourceDetails) { - this.teamsPhoneSourceDetails = teamsPhoneSourceDetails; - return this; - } - - /** - * Get the sessionId property: Id to exclusively identify this call session. IVR will use this for their - * telemetry/reporting. - * - * @return the sessionId value. - */ - @Generated - public String getSessionId() { - return this.sessionId; - } - - /** - * Set the sessionId property: Id to exclusively identify this call session. IVR will use this for their - * telemetry/reporting. - * - * @param sessionId the sessionId value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setSessionId(String sessionId) { - this.sessionId = sessionId; - return this; - } - - /** - * Get the intent property: The intent of the call. - * - * @return the intent value. - */ - @Generated - public String getIntent() { - return this.intent; - } - - /** - * Set the intent property: The intent of the call. - * - * @param intent the intent value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setIntent(String intent) { - this.intent = intent; - return this; - } - - /** - * Get the callTopic property: A very short description (max 48 chars) of the reason for the call. To be displayed - * in Teams CallNotification. - * - * @return the callTopic value. - */ - @Generated - public String getCallTopic() { - return this.callTopic; - } - - /** - * Set the callTopic property: A very short description (max 48 chars) of the reason for the call. To be displayed - * in Teams CallNotification. - * - * @param callTopic the callTopic value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setCallTopic(String callTopic) { - this.callTopic = callTopic; - return this; - } - - /** - * Get the callContext property: A summary of the call thus far. It will be displayed on a side panel in the Teams - * UI. - * - * @return the callContext value. - */ - @Generated - public String getCallContext() { - return this.callContext; - } - - /** - * Set the callContext property: A summary of the call thus far. It will be displayed on a side panel in the Teams - * UI. - * - * @param callContext the callContext value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setCallContext(String callContext) { - this.callContext = callContext; - return this; - } - - /** - * Get the transcriptUrl property: Url for fetching the transcript of the call. - * - * @return the transcriptUrl value. - */ - @Generated - public String getTranscriptUrl() { - return this.transcriptUrl; - } - - /** - * Set the transcriptUrl property: Url for fetching the transcript of the call. - * - * @param transcriptUrl the transcriptUrl value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setTranscriptUrl(String transcriptUrl) { - this.transcriptUrl = transcriptUrl; - return this; - } - - /** - * Get the callSentiment property: Sentiment of the call thus far. - * - * @return the callSentiment value. - */ - @Generated - public String getCallSentiment() { - return this.callSentiment; - } - - /** - * Set the callSentiment property: Sentiment of the call thus far. - * - * @param callSentiment the callSentiment value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setCallSentiment(String callSentiment) { - this.callSentiment = callSentiment; - return this; - } - - /** - * Get the suggestedActions property: Recommendations for resolving the issue based on the customer’s intent and - * interaction history. - * - * @return the suggestedActions value. - */ - @Generated - public String getSuggestedActions() { - return this.suggestedActions; - } - - /** - * Set the suggestedActions property: Recommendations for resolving the issue based on the customer’s intent and - * interaction history. - * - * @param suggestedActions the suggestedActions value to set. - * @return the TeamsPhoneCallDetails object itself. - */ - @Generated - public TeamsPhoneCallDetails setSuggestedActions(String suggestedActions) { - this.suggestedActions = suggestedActions; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("teamsPhoneCallerDetails", this.teamsPhoneCallerDetails); - jsonWriter.writeJsonField("teamsPhoneSourceDetails", this.teamsPhoneSourceDetails); - jsonWriter.writeStringField("sessionId", this.sessionId); - jsonWriter.writeStringField("intent", this.intent); - jsonWriter.writeStringField("callTopic", this.callTopic); - jsonWriter.writeStringField("callContext", this.callContext); - jsonWriter.writeStringField("transcriptUrl", this.transcriptUrl); - jsonWriter.writeStringField("callSentiment", this.callSentiment); - jsonWriter.writeStringField("suggestedActions", this.suggestedActions); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TeamsPhoneCallDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TeamsPhoneCallDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the TeamsPhoneCallDetails. - */ - @Generated - public static TeamsPhoneCallDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TeamsPhoneCallDetails deserializedTeamsPhoneCallDetails = new TeamsPhoneCallDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("teamsPhoneCallerDetails".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.teamsPhoneCallerDetails - = TeamsPhoneCallerDetails.fromJson(reader); - } else if ("teamsPhoneSourceDetails".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.teamsPhoneSourceDetails - = TeamsPhoneSourceDetails.fromJson(reader); - } else if ("sessionId".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.sessionId = reader.getString(); - } else if ("intent".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.intent = reader.getString(); - } else if ("callTopic".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.callTopic = reader.getString(); - } else if ("callContext".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.callContext = reader.getString(); - } else if ("transcriptUrl".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.transcriptUrl = reader.getString(); - } else if ("callSentiment".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.callSentiment = reader.getString(); - } else if ("suggestedActions".equals(fieldName)) { - deserializedTeamsPhoneCallDetails.suggestedActions = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTeamsPhoneCallDetails; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallerDetails.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallerDetails.java deleted file mode 100644 index 68b68e8a1a2c..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneCallerDetails.java +++ /dev/null @@ -1,285 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container for details relating to the original caller of the call. - */ -@Fluent -public final class TeamsPhoneCallerDetails implements JsonSerializable { - /* - * Caller's ID - */ - @Generated - private CommunicationIdentifierModel caller; - - /* - * Caller's name - */ - @Generated - private String name; - - /* - * Caller's phone number - */ - @Generated - private String phoneNumber; - - /* - * Caller's record ID (ex in CRM) - */ - @Generated - private String recordId; - - /* - * Caller's screen pop URL - */ - @Generated - private String screenPopUrl; - - /* - * Flag indicating whether the caller was authenticated - */ - @Generated - private Boolean isAuthenticated; - - /* - * A set of key value pairs (max 10, any additional entries would be ignored) which a bot author wants to pass to - * the Teams Client for display to the agent - */ - @Generated - private Map additionalCallerInformation; - - /** - * Creates an instance of TeamsPhoneCallerDetails class. - */ - @Generated - public TeamsPhoneCallerDetails() { - } - - /** - * Get the caller property: Caller's ID. - * - * @return the caller value. - */ - @Generated - public CommunicationIdentifierModel getCaller() { - return this.caller; - } - - /** - * Set the caller property: Caller's ID. - * - * @param caller the caller value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setCaller(CommunicationIdentifierModel caller) { - this.caller = caller; - return this; - } - - /** - * Get the name property: Caller's name. - * - * @return the name value. - */ - @Generated - public String getName() { - return this.name; - } - - /** - * Set the name property: Caller's name. - * - * @param name the name value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setName(String name) { - this.name = name; - return this; - } - - /** - * Get the phoneNumber property: Caller's phone number. - * - * @return the phoneNumber value. - */ - @Generated - public String getPhoneNumber() { - return this.phoneNumber; - } - - /** - * Set the phoneNumber property: Caller's phone number. - * - * @param phoneNumber the phoneNumber value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setPhoneNumber(String phoneNumber) { - this.phoneNumber = phoneNumber; - return this; - } - - /** - * Get the recordId property: Caller's record ID (ex in CRM). - * - * @return the recordId value. - */ - @Generated - public String getRecordId() { - return this.recordId; - } - - /** - * Set the recordId property: Caller's record ID (ex in CRM). - * - * @param recordId the recordId value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setRecordId(String recordId) { - this.recordId = recordId; - return this; - } - - /** - * Get the screenPopUrl property: Caller's screen pop URL. - * - * @return the screenPopUrl value. - */ - @Generated - public String getScreenPopUrl() { - return this.screenPopUrl; - } - - /** - * Set the screenPopUrl property: Caller's screen pop URL. - * - * @param screenPopUrl the screenPopUrl value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setScreenPopUrl(String screenPopUrl) { - this.screenPopUrl = screenPopUrl; - return this; - } - - /** - * Get the isAuthenticated property: Flag indicating whether the caller was authenticated. - * - * @return the isAuthenticated value. - */ - @Generated - public Boolean isAuthenticated() { - return this.isAuthenticated; - } - - /** - * Set the isAuthenticated property: Flag indicating whether the caller was authenticated. - * - * @param isAuthenticated the isAuthenticated value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setIsAuthenticated(Boolean isAuthenticated) { - this.isAuthenticated = isAuthenticated; - return this; - } - - /** - * Get the additionalCallerInformation property: A set of key value pairs (max 10, any additional entries would be - * ignored) which a bot author wants to pass to the Teams Client for display to the agent. - * - * @return the additionalCallerInformation value. - */ - @Generated - public Map getAdditionalCallerInformation() { - return this.additionalCallerInformation; - } - - /** - * Set the additionalCallerInformation property: A set of key value pairs (max 10, any additional entries would be - * ignored) which a bot author wants to pass to the Teams Client for display to the agent. - * - * @param additionalCallerInformation the additionalCallerInformation value to set. - * @return the TeamsPhoneCallerDetails object itself. - */ - @Generated - public TeamsPhoneCallerDetails setAdditionalCallerInformation(Map additionalCallerInformation) { - this.additionalCallerInformation = additionalCallerInformation; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("caller", this.caller); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("phoneNumber", this.phoneNumber); - jsonWriter.writeStringField("recordId", this.recordId); - jsonWriter.writeStringField("screenPopUrl", this.screenPopUrl); - jsonWriter.writeBooleanField("isAuthenticated", this.isAuthenticated); - jsonWriter.writeMapField("additionalCallerInformation", this.additionalCallerInformation, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TeamsPhoneCallerDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TeamsPhoneCallerDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TeamsPhoneCallerDetails. - */ - @Generated - public static TeamsPhoneCallerDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TeamsPhoneCallerDetails deserializedTeamsPhoneCallerDetails = new TeamsPhoneCallerDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("caller".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.caller = CommunicationIdentifierModel.fromJson(reader); - } else if ("name".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.name = reader.getString(); - } else if ("phoneNumber".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.phoneNumber = reader.getString(); - } else if ("recordId".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.recordId = reader.getString(); - } else if ("screenPopUrl".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.screenPopUrl = reader.getString(); - } else if ("isAuthenticated".equals(fieldName)) { - deserializedTeamsPhoneCallerDetails.isAuthenticated = reader.getNullable(JsonReader::getBoolean); - } else if ("additionalCallerInformation".equals(fieldName)) { - Map additionalCallerInformation = reader.readMap(reader1 -> reader1.getString()); - deserializedTeamsPhoneCallerDetails.additionalCallerInformation = additionalCallerInformation; - } else { - reader.skipChildren(); - } - } - - return deserializedTeamsPhoneCallerDetails; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneSourceDetails.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneSourceDetails.java deleted file mode 100644 index adb98bda4380..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TeamsPhoneSourceDetails.java +++ /dev/null @@ -1,194 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container for details relating to the entity responsible for the creation of these call details. - */ -@Fluent -public final class TeamsPhoneSourceDetails implements JsonSerializable { - /* - * ID of the source entity passing along the call details (ex. Application Instance ID of - CQ/AA) - */ - @Generated - private CommunicationIdentifierModel source; - - /* - * Language of the source entity passing along the call details, passed in the ISO-639 standard - */ - @Generated - private String language; - - /* - * Status of the source entity passing along the call details - */ - @Generated - private String status; - - /* - * Intended targets of the source entity passing along the call details - */ - @Generated - private Map intendedTargets; - - /** - * Creates an instance of TeamsPhoneSourceDetails class. - */ - @Generated - public TeamsPhoneSourceDetails() { - } - - /** - * Get the source property: ID of the source entity passing along the call details (ex. Application Instance ID of - - * CQ/AA). - * - * @return the source value. - */ - @Generated - public CommunicationIdentifierModel getSource() { - return this.source; - } - - /** - * Set the source property: ID of the source entity passing along the call details (ex. Application Instance ID of - - * CQ/AA). - * - * @param source the source value to set. - * @return the TeamsPhoneSourceDetails object itself. - */ - @Generated - public TeamsPhoneSourceDetails setSource(CommunicationIdentifierModel source) { - this.source = source; - return this; - } - - /** - * Get the language property: Language of the source entity passing along the call details, passed in the ISO-639 - * standard. - * - * @return the language value. - */ - @Generated - public String getLanguage() { - return this.language; - } - - /** - * Set the language property: Language of the source entity passing along the call details, passed in the ISO-639 - * standard. - * - * @param language the language value to set. - * @return the TeamsPhoneSourceDetails object itself. - */ - @Generated - public TeamsPhoneSourceDetails setLanguage(String language) { - this.language = language; - return this; - } - - /** - * Get the status property: Status of the source entity passing along the call details. - * - * @return the status value. - */ - @Generated - public String getStatus() { - return this.status; - } - - /** - * Set the status property: Status of the source entity passing along the call details. - * - * @param status the status value to set. - * @return the TeamsPhoneSourceDetails object itself. - */ - @Generated - public TeamsPhoneSourceDetails setStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the intendedTargets property: Intended targets of the source entity passing along the call details. - * - * @return the intendedTargets value. - */ - @Generated - public Map getIntendedTargets() { - return this.intendedTargets; - } - - /** - * Set the intendedTargets property: Intended targets of the source entity passing along the call details. - * - * @param intendedTargets the intendedTargets value to set. - * @return the TeamsPhoneSourceDetails object itself. - */ - @Generated - public TeamsPhoneSourceDetails setIntendedTargets(Map intendedTargets) { - this.intendedTargets = intendedTargets; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("source", this.source); - jsonWriter.writeStringField("language", this.language); - jsonWriter.writeStringField("status", this.status); - jsonWriter.writeMapField("intendedTargets", this.intendedTargets, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TeamsPhoneSourceDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TeamsPhoneSourceDetails if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TeamsPhoneSourceDetails. - */ - @Generated - public static TeamsPhoneSourceDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TeamsPhoneSourceDetails deserializedTeamsPhoneSourceDetails = new TeamsPhoneSourceDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("source".equals(fieldName)) { - deserializedTeamsPhoneSourceDetails.source = CommunicationIdentifierModel.fromJson(reader); - } else if ("language".equals(fieldName)) { - deserializedTeamsPhoneSourceDetails.language = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedTeamsPhoneSourceDetails.status = reader.getString(); - } else if ("intendedTargets".equals(fieldName)) { - Map intendedTargets - = reader.readMap(reader1 -> CommunicationIdentifierModel.fromJson(reader1)); - deserializedTeamsPhoneSourceDetails.intendedTargets = intendedTargets; - } else { - reader.skipChildren(); - } - } - - return deserializedTeamsPhoneSourceDetails; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Transcription.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Transcription.java deleted file mode 100644 index 57edb81ea4d5..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/Transcription.java +++ /dev/null @@ -1,95 +0,0 @@ -// 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.azure.core.annotation.Generated; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Transcription model. - */ -@Fluent -public final class Transcription implements JsonSerializable { - /* - * Determine if the Transcription should be enabled for the post recording processing. - */ - @Generated - private boolean enableTranscription; - - /** - * Creates an instance of Transcription class. - */ - @Generated - public Transcription() { - } - - /** - * Get the enableTranscription property: Determine if the Transcription should be enabled for the post recording - * processing. - * - * @return the enableTranscription value. - */ - @Generated - public boolean isEnableTranscription() { - return this.enableTranscription; - } - - /** - * Set the enableTranscription property: Determine if the Transcription should be enabled for the post recording - * processing. - * - * @param enableTranscription the enableTranscription value to set. - * @return the Transcription object itself. - */ - @Generated - public Transcription setEnableTranscription(boolean enableTranscription) { - this.enableTranscription = enableTranscription; - return this; - } - - /** - * {@inheritDoc} - */ - @Generated - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableTranscription", this.enableTranscription); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Transcription from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Transcription if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Transcription. - */ - @Generated - public static Transcription fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Transcription deserializedTranscription = new Transcription(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableTranscription".equals(fieldName)) { - deserializedTranscription.enableTranscription = reader.getBoolean(); - } else { - reader.skipChildren(); - } - } - - return deserializedTranscription; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptions.java deleted file mode 100644 index 0cce79e4cc9d..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptions.java +++ /dev/null @@ -1,230 +0,0 @@ -// 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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of live transcription. - */ -@Fluent -public final class TranscriptionOptions implements JsonSerializable { - /* - * Transport URL for live transcription - */ - private String transportUrl; - - /* - * The type of transport to be used for live transcription, eg. Websocket - */ - private TranscriptionTransportTypeInternal transportType; - - /* - * Defines the locale for the data e.g en-CA, en-AU - */ - private String locale; - - /* - * Endpoint where the custom model was deployed. - */ - private String speechRecognitionModelEndpointId; - - /* - * Determines if the transcription should be started immediately after call is answered or not. - */ - private boolean startTranscription; - - /* - * Enables intermediate results for the transcribed speech. - */ - private Boolean enableIntermediateResults; - - /** - * Creates an instance of TranscriptionOptions class. - */ - public TranscriptionOptions() { - } - - /** - * Get the transportUrl property: Transport URL for live transcription. - * - * @return the transportUrl value. - */ - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for live transcription. - * - * @param transportUrl the transportUrl value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for live transcription, eg. Websocket. - * - * @return the transportType value. - */ - public TranscriptionTransportTypeInternal getTransportType() { - return this.transportType; - } - - /** - * Set the transportType property: The type of transport to be used for live transcription, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setTransportType(TranscriptionTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the locale property: Defines the locale for the data e.g en-CA, en-AU. - * - * @return the locale value. - */ - public String getLocale() { - return this.locale; - } - - /** - * Set the locale property: Defines the locale for the data e.g en-CA, en-AU. - * - * @param locale the locale value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setLocale(String locale) { - this.locale = locale; - return this; - } - - /** - * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * - * @return the speechRecognitionModelEndpointId value. - */ - public String getSpeechRecognitionModelEndpointId() { - return this.speechRecognitionModelEndpointId; - } - - /** - * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * - * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId) { - this.speechRecognitionModelEndpointId = speechRecognitionModelEndpointId; - return this; - } - - /** - * Get the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @return the startTranscription value. - */ - public boolean isStartTranscription() { - return this.startTranscription; - } - - /** - * Set the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @param startTranscription the startTranscription value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setStartTranscription(boolean startTranscription) { - this.startTranscription = startTranscription; - return this; - } - - /** - * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @return the enableIntermediateResults value. - */ - public Boolean isEnableIntermediateResults() { - return this.enableIntermediateResults; - } - - /** - * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @param enableIntermediateResults the enableIntermediateResults value to set. - * @return the TranscriptionOptions object itself. - */ - public TranscriptionOptions setEnableIntermediateResults(Boolean enableIntermediateResults) { - this.enableIntermediateResults = enableIntermediateResults; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); - jsonWriter.writeStringField("locale", this.locale); - jsonWriter.writeBooleanField("startTranscription", this.startTranscription); - jsonWriter.writeStringField("speechRecognitionModelEndpointId", this.speechRecognitionModelEndpointId); - jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TranscriptionOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TranscriptionOptions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the TranscriptionOptions. - */ - public static TranscriptionOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TranscriptionOptions deserializedTranscriptionOptions = new TranscriptionOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("transportUrl".equals(fieldName)) { - deserializedTranscriptionOptions.transportUrl = reader.getString(); - } else if ("transportType".equals(fieldName)) { - deserializedTranscriptionOptions.transportType - = TranscriptionTransportTypeInternal.fromString(reader.getString()); - } else if ("locale".equals(fieldName)) { - deserializedTranscriptionOptions.locale = reader.getString(); - } else if ("startTranscription".equals(fieldName)) { - deserializedTranscriptionOptions.startTranscription = reader.getBoolean(); - } else if ("speechRecognitionModelEndpointId".equals(fieldName)) { - deserializedTranscriptionOptions.speechRecognitionModelEndpointId = reader.getString(); - } else if ("enableIntermediateResults".equals(fieldName)) { - deserializedTranscriptionOptions.enableIntermediateResults - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedTranscriptionOptions; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java index 15032c8aaee6..91f544bbfa78 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionOptionsInternal.java @@ -13,46 +13,24 @@ import java.io.IOException; /** - * Configuration of live transcription. + * Options for live transcription. */ @Fluent -public final class TranscriptionOptionsInternal implements JsonSerializable { +public class TranscriptionOptionsInternal implements JsonSerializable { /* - * Transport URL for live transcription + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. */ @Generated - private String transportUrl; + private StreamingTransportTypeInternal transportType + = StreamingTransportTypeInternal.fromString("TranscriptionOptionsInternal"); /* - * The type of transport to be used for live transcription, eg. Websocket - */ - @Generated - private TranscriptionTransportTypeInternal transportType; - - /* - * Defines the locale for the data e.g en-CA, en-AU + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ @Generated private String locale; - /* - * Endpoint where the custom model was deployed. - */ - @Generated - private String speechModelEndpointId; - - /* - * Determines if the transcription should be started immediately after call is answered or not. - */ - @Generated - private boolean startTranscription; - - /* - * Enables intermediate results for the transcribed speech. - */ - @Generated - private Boolean enableIntermediateResults; - /** * Creates an instance of TranscriptionOptionsInternal class. */ @@ -61,51 +39,18 @@ public TranscriptionOptionsInternal() { } /** - * Get the transportUrl property: Transport URL for live transcription. - * - * @return the transportUrl value. - */ - @Generated - public String getTransportUrl() { - return this.transportUrl; - } - - /** - * Set the transportUrl property: Transport URL for live transcription. - * - * @param transportUrl the transportUrl value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - @Generated - public TranscriptionOptionsInternal setTransportUrl(String transportUrl) { - this.transportUrl = transportUrl; - return this; - } - - /** - * Get the transportType property: The type of transport to be used for live transcription, eg. Websocket. + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. * * @return the transportType value. */ @Generated - public TranscriptionTransportTypeInternal getTransportType() { + public StreamingTransportTypeInternal getTransportType() { return this.transportType; } /** - * Set the transportType property: The type of transport to be used for live transcription, eg. Websocket. - * - * @param transportType the transportType value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - @Generated - public TranscriptionOptionsInternal setTransportType(TranscriptionTransportTypeInternal transportType) { - this.transportType = transportType; - return this; - } - - /** - * Get the locale property: Defines the locale for the data e.g en-CA, en-AU. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -115,7 +60,7 @@ public String getLocale() { } /** - * Set the locale property: Defines the locale for the data e.g en-CA, en-AU. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the TranscriptionOptionsInternal object itself. @@ -126,74 +71,6 @@ public TranscriptionOptionsInternal setLocale(String locale) { return this; } - /** - * Get the speechModelEndpointId property: Endpoint where the custom model was deployed. - * - * @return the speechModelEndpointId value. - */ - @Generated - public String getSpeechModelEndpointId() { - return this.speechModelEndpointId; - } - - /** - * Set the speechModelEndpointId property: Endpoint where the custom model was deployed. - * - * @param speechModelEndpointId the speechModelEndpointId value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - @Generated - public TranscriptionOptionsInternal setSpeechModelEndpointId(String speechModelEndpointId) { - this.speechModelEndpointId = speechModelEndpointId; - return this; - } - - /** - * Get the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @return the startTranscription value. - */ - @Generated - public boolean isStartTranscription() { - return this.startTranscription; - } - - /** - * Set the startTranscription property: Determines if the transcription should be started immediately after call is - * answered or not. - * - * @param startTranscription the startTranscription value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - @Generated - public TranscriptionOptionsInternal setStartTranscription(boolean startTranscription) { - this.startTranscription = startTranscription; - return this; - } - - /** - * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @return the enableIntermediateResults value. - */ - @Generated - public Boolean isEnableIntermediateResults() { - return this.enableIntermediateResults; - } - - /** - * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * - * @param enableIntermediateResults the enableIntermediateResults value to set. - * @return the TranscriptionOptionsInternal object itself. - */ - @Generated - public TranscriptionOptionsInternal setEnableIntermediateResults(Boolean enableIntermediateResults) { - this.enableIntermediateResults = enableIntermediateResults; - return this; - } - /** * {@inheritDoc} */ @@ -201,12 +78,8 @@ public TranscriptionOptionsInternal setEnableIntermediateResults(Boolean enableI @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); - jsonWriter.writeStringField("transportUrl", this.transportUrl); - jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); jsonWriter.writeStringField("locale", this.locale); - jsonWriter.writeBooleanField("startTranscription", this.startTranscription); - jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); - jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); return jsonWriter.writeEndObject(); } @@ -221,26 +94,43 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { */ @Generated public static TranscriptionOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String discriminatorValue = null; + try (JsonReader readerToUse = reader.bufferObject()) { + readerToUse.nextToken(); // Prepare for reading + while (readerToUse.nextToken() != JsonToken.END_OBJECT) { + String fieldName = readerToUse.getFieldName(); + readerToUse.nextToken(); + if ("transportType".equals(fieldName)) { + discriminatorValue = readerToUse.getString(); + break; + } else { + readerToUse.skipChildren(); + } + } + // Use the discriminator value to determine which subtype should be deserialized. + if ("websocket".equals(discriminatorValue)) { + return WebSocketTranscriptionOptionsInternal.fromJson(readerToUse.reset()); + } else { + return fromJsonKnownDiscriminator(readerToUse.reset()); + } + } + }); + } + + @Generated + static TranscriptionOptionsInternal fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { TranscriptionOptionsInternal deserializedTranscriptionOptionsInternal = new TranscriptionOptionsInternal(); while (reader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); - if ("transportUrl".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.transportUrl = reader.getString(); + if ("locale".equals(fieldName)) { + deserializedTranscriptionOptionsInternal.locale = reader.getString(); } else if ("transportType".equals(fieldName)) { deserializedTranscriptionOptionsInternal.transportType - = TranscriptionTransportTypeInternal.fromString(reader.getString()); - } else if ("locale".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.locale = reader.getString(); - } else if ("startTranscription".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.startTranscription = reader.getBoolean(); - } else if ("speechModelEndpointId".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.speechModelEndpointId = reader.getString(); - } else if ("enableIntermediateResults".equals(fieldName)) { - deserializedTranscriptionOptionsInternal.enableIntermediateResults - = reader.getNullable(JsonReader::getBoolean); + = StreamingTransportTypeInternal.fromString(reader.getString()); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java index b3643d43b8ae..01cb5093fa45 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionSubscriptionInternal.java @@ -36,6 +36,12 @@ public final class TranscriptionSubscriptionInternal implements JsonSerializable @Generated private List subscribedResultTypes; + /* + * Specifies the locale used for transcription, e.g., en-CA or en-AU. + */ + @Generated + private String locale; + /** * Creates an instance of TranscriptionSubscriptionInternal class. */ @@ -110,6 +116,28 @@ public List getSubscribedResultTypes() { return this; } + /** + * Get the locale property: Specifies the locale used for transcription, e.g., en-CA or en-AU. + * + * @return the locale value. + */ + @Generated + public String getLocale() { + return this.locale; + } + + /** + * Set the locale property: Specifies the locale used for transcription, e.g., en-CA or en-AU. + * + * @param locale the locale value to set. + * @return the TranscriptionSubscriptionInternal object itself. + */ + @Generated + public TranscriptionSubscriptionInternal setLocale(String locale) { + this.locale = locale; + return this; + } + /** * {@inheritDoc} */ @@ -121,6 +149,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); jsonWriter.writeArrayField("subscribedResultTypes", this.subscribedResultTypes, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("locale", this.locale); return jsonWriter.writeEndObject(); } @@ -150,6 +179,8 @@ public static TranscriptionSubscriptionInternal fromJson(JsonReader jsonReader) List subscribedResultTypes = reader.readArray(reader1 -> TranscriptionResultTypeInternal.fromString(reader1.getString())); deserializedTranscriptionSubscriptionInternal.subscribedResultTypes = subscribedResultTypes; + } else if ("locale".equals(fieldName)) { + deserializedTranscriptionSubscriptionInternal.locale = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportTypeInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportTypeInternal.java index 879c05b8460c..ec5eb7f3e9a3 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportTypeInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportTypeInternal.java @@ -4,7 +4,6 @@ package com.azure.communication.callautomation.implementation.models; -import com.azure.core.annotation.Generated; import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; @@ -15,7 +14,6 @@ public final class TranscriptionTransportTypeInternal extends ExpandableStringEn /** * Static value websocket for TranscriptionTransportTypeInternal. */ - @Generated public static final TranscriptionTransportTypeInternal WEBSOCKET = fromString("websocket"); /** @@ -23,7 +21,6 @@ public final class TranscriptionTransportTypeInternal extends ExpandableStringEn * * @deprecated Use the {@link #fromString(String)} factory method. */ - @Generated @Deprecated public TranscriptionTransportTypeInternal() { } @@ -34,7 +31,6 @@ public TranscriptionTransportTypeInternal() { * @param name a name to look for. * @return the corresponding TranscriptionTransportTypeInternal. */ - @Generated public static TranscriptionTransportTypeInternal fromString(String name) { return fromString(name, TranscriptionTransportTypeInternal.class); } @@ -44,7 +40,6 @@ public static TranscriptionTransportTypeInternal fromString(String name) { * * @return known TranscriptionTransportTypeInternal values. */ - @Generated public static Collection values() { return values(TranscriptionTransportTypeInternal.class); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java index 4b47d23c8fbb..c9c6a6a72043 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdRequest.java @@ -30,6 +30,13 @@ public final class UnholdRequest implements JsonSerializable { @Generated private String operationContext; + /* + * Set a callback URI that overrides the default callback URI set by CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + */ + @Generated + private String operationCallbackUri; + /** * Creates an instance of UnholdRequest class. */ @@ -85,6 +92,32 @@ public UnholdRequest setOperationContext(String operationContext) { return this; } + /** + * Get the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + * + * @return the operationCallbackUri value. + */ + @Generated + public String getOperationCallbackUri() { + return this.operationCallbackUri; + } + + /** + * Set the operationCallbackUri property: Set a callback URI that overrides the default callback URI set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + * + * @param operationCallbackUri the operationCallbackUri value to set. + * @return the UnholdRequest object itself. + */ + @Generated + public UnholdRequest setOperationCallbackUri(String operationCallbackUri) { + this.operationCallbackUri = operationCallbackUri; + return this; + } + /** * {@inheritDoc} */ @@ -94,6 +127,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeJsonField("targetParticipant", this.targetParticipant); jsonWriter.writeStringField("operationContext", this.operationContext); + jsonWriter.writeStringField("operationCallbackUri", this.operationCallbackUri); return jsonWriter.writeEndObject(); } @@ -118,6 +152,8 @@ public static UnholdRequest fromJson(JsonReader jsonReader) throws IOException { deserializedUnholdRequest.targetParticipant = CommunicationIdentifierModel.fromJson(reader); } else if ("operationContext".equals(fieldName)) { deserializedUnholdRequest.operationContext = reader.getString(); + } else if ("operationCallbackUri".equals(fieldName)) { + deserializedUnholdRequest.operationCallbackUri = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsRequestInternal.java index 850f79d3a6a4..27f9ad4068df 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsRequestInternal.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -22,19 +21,16 @@ public final class UnmuteParticipantsRequestInternal implements JsonSerializable * Participants to be unmuted from the call. * Only ACS Users are supported. */ - @Generated private List targetParticipants; /* * Used by customers when calling mid-call actions to correlate the request to the response event. */ - @Generated private String operationContext; /** * Creates an instance of UnmuteParticipantsRequestInternal class. */ - @Generated public UnmuteParticipantsRequestInternal() { } @@ -44,7 +40,6 @@ public UnmuteParticipantsRequestInternal() { * * @return the targetParticipants value. */ - @Generated public List getTargetParticipants() { return this.targetParticipants; } @@ -56,7 +51,6 @@ public List getTargetParticipants() { * @param targetParticipants the targetParticipants value to set. * @return the UnmuteParticipantsRequestInternal object itself. */ - @Generated public UnmuteParticipantsRequestInternal setTargetParticipants(List targetParticipants) { this.targetParticipants = targetParticipants; @@ -69,7 +63,6 @@ public List getTargetParticipants() { * * @return the operationContext value. */ - @Generated public String getOperationContext() { return this.operationContext; } @@ -81,7 +74,6 @@ public String getOperationContext() { * @param operationContext the operationContext value to set. * @return the UnmuteParticipantsRequestInternal object itself. */ - @Generated public UnmuteParticipantsRequestInternal setOperationContext(String operationContext) { this.operationContext = operationContext; return this; @@ -90,7 +82,6 @@ public UnmuteParticipantsRequestInternal setOperationContext(String operationCon /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -109,7 +100,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * @throws IllegalStateException If the deserialized JSON object was missing any required properties. * @throws IOException If an error occurs while reading the UnmuteParticipantsRequestInternal. */ - @Generated public static UnmuteParticipantsRequestInternal fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { UnmuteParticipantsRequestInternal deserializedUnmuteParticipantsRequestInternal diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsResponseInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsResponseInternal.java index 0f6828f4386f..4d14d4293bfe 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsResponseInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnmuteParticipantsResponseInternal.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,13 +19,11 @@ public final class UnmuteParticipantsResponseInternal implements JsonSerializabl /* * The operation context provided by client. */ - @Generated private String operationContext; /** * Creates an instance of UnmuteParticipantsResponseInternal class. */ - @Generated public UnmuteParticipantsResponseInternal() { } @@ -35,7 +32,6 @@ public UnmuteParticipantsResponseInternal() { * * @return the operationContext value. */ - @Generated public String getOperationContext() { return this.operationContext; } @@ -46,7 +42,6 @@ public String getOperationContext() { * @param operationContext the operationContext value to set. * @return the UnmuteParticipantsResponseInternal object itself. */ - @Generated public UnmuteParticipantsResponseInternal setOperationContext(String operationContext) { this.operationContext = operationContext; return this; @@ -55,7 +50,6 @@ public UnmuteParticipantsResponseInternal setOperationContext(String operationCo /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -71,7 +65,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * null if it was pointing to JSON null. * @throws IOException If an error occurs while reading the UnmuteParticipantsResponseInternal. */ - @Generated public static UnmuteParticipantsResponseInternal fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { UnmuteParticipantsResponseInternal deserializedUnmuteParticipantsResponseInternal diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateDialogRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateDialogRequest.java index 1e0a45c72e8e..4958d7474d8b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateDialogRequest.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateDialogRequest.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,26 +19,22 @@ public final class UpdateDialogRequest implements JsonSerializable { UpdateDialogRequest deserializedUpdateDialogRequest = new UpdateDialogRequest(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java index 8216dcb2b30d..9058f74a7b6c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionRequestInternal.java @@ -18,13 +18,13 @@ @Fluent public final class UpdateTranscriptionRequestInternal implements JsonSerializable { /* - * Defines new locale for transcription. + * Specifies the Locale used for transcription, e.g., en-CA or en-AU. */ @Generated private String locale; /* - * Sets Endpoint id where the custom model was deployed. + * The ID of the deployed custom model, in GUID format, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. */ @Generated private String speechModelEndpointId; @@ -50,7 +50,7 @@ public UpdateTranscriptionRequestInternal() { } /** - * Get the locale property: Defines new locale for transcription. + * Get the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @return the locale value. */ @@ -60,7 +60,7 @@ public String getLocale() { } /** - * Set the locale property: Defines new locale for transcription. + * Set the locale property: Specifies the Locale used for transcription, e.g., en-CA or en-AU. * * @param locale the locale value to set. * @return the UpdateTranscriptionRequestInternal object itself. @@ -72,7 +72,8 @@ public UpdateTranscriptionRequestInternal setLocale(String locale) { } /** - * Get the speechModelEndpointId property: Sets Endpoint id where the custom model was deployed. + * Get the speechModelEndpointId property: The ID of the deployed custom model, in GUID format, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. * * @return the speechModelEndpointId value. */ @@ -82,7 +83,8 @@ public String getSpeechModelEndpointId() { } /** - * Set the speechModelEndpointId property: Sets Endpoint id where the custom model was deployed. + * Set the speechModelEndpointId property: The ID of the deployed custom model, in GUID format, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. * * @param speechModelEndpointId the speechModelEndpointId value to set. * @return the UpdateTranscriptionRequestInternal object itself. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UserConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UserConsent.java index eb07cffa82f1..7bcc3564c522 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UserConsent.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UserConsent.java @@ -5,7 +5,6 @@ package com.azure.communication.callautomation.implementation.models; import com.azure.core.annotation.Fluent; -import com.azure.core.annotation.Generated; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; @@ -20,13 +19,11 @@ public final class UserConsent implements JsonSerializable { /* * The recording property. */ - @Generated private Integer recording; /** * Creates an instance of UserConsent class. */ - @Generated public UserConsent() { } @@ -35,7 +32,6 @@ public UserConsent() { * * @return the recording value. */ - @Generated public Integer getRecording() { return this.recording; } @@ -46,7 +42,6 @@ public Integer getRecording() { * @param recording the recording value to set. * @return the UserConsent object itself. */ - @Generated public UserConsent setRecording(Integer recording) { this.recording = recording; return this; @@ -55,7 +50,6 @@ public UserConsent setRecording(Integer recording) { /** * {@inheritDoc} */ - @Generated @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); @@ -71,7 +65,6 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { * pointing to JSON null. * @throws IOException If an error occurs while reading the UserConsent. */ - @Generated public static UserConsent fromJson(JsonReader jsonReader) throws IOException { return jsonReader.readObject(reader -> { UserConsent deserializedUserConsent = new UserConsent(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java new file mode 100644 index 000000000000..3e8b5e864850 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketMediaStreamingOptionsInternal.java @@ -0,0 +1,296 @@ +// 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.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketMediaStreamingOptionsInternal extends MediaStreamingOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. + */ + @Generated + private StreamingTransportTypeInternal transportType = StreamingTransportTypeInternal.WEBSOCKET; + + /* + * The transport URL for media streaming. + */ + @Generated + private String transportUrl; + + /* + * The contentType property. + */ + @Generated + private MediaStreamingContentTypeInternal contentType; + + /* + * A value indicating whether the media streaming should start immediately after the call is answered. + */ + @Generated + private Boolean startMediaStreaming; + + /* + * A value indicating whether bidirectional streaming is enabled. + */ + @Generated + private Boolean enableBidirectional; + + /* + * The audio format used for encoding, including sample rate and channel type. The default is Pcm16KMono. + */ + @Generated + private AudioFormatInternal audioFormat; + + /* + * A value that indicates whether to stream the DTMF tones. + */ + @Generated + private Boolean enableDtmfTones; + + /** + * Creates an instance of WebSocketMediaStreamingOptionsInternal class. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Generated + @Override + public StreamingTransportTypeInternal getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The transport URL for media streaming. + * + * @return the transportUrl value. + */ + @Generated + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The transport URL for media streaming. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the contentType property: The contentType property. + * + * @return the contentType value. + */ + @Generated + public MediaStreamingContentTypeInternal getContentType() { + return this.contentType; + } + + /** + * Set the contentType property: The contentType property. + * + * @param contentType the contentType value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setContentType(MediaStreamingContentTypeInternal contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @return the startMediaStreaming value. + */ + @Generated + public Boolean isStartMediaStreaming() { + return this.startMediaStreaming; + } + + /** + * Set the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @param startMediaStreaming the startMediaStreaming value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setStartMediaStreaming(Boolean startMediaStreaming) { + this.startMediaStreaming = startMediaStreaming; + return this; + } + + /** + * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @return the enableBidirectional value. + */ + @Generated + public Boolean isEnableBidirectional() { + return this.enableBidirectional; + } + + /** + * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. + * + * @param enableBidirectional the enableBidirectional value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setEnableBidirectional(Boolean enableBidirectional) { + this.enableBidirectional = enableBidirectional; + return this; + } + + /** + * Get the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @return the audioFormat value. + */ + @Generated + public AudioFormatInternal getAudioFormat() { + return this.audioFormat; + } + + /** + * Set the audioFormat property: The audio format used for encoding, including sample rate and channel type. The + * default is Pcm16KMono. + * + * @param audioFormat the audioFormat value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setAudioFormat(AudioFormatInternal audioFormat) { + this.audioFormat = audioFormat; + return this; + } + + /** + * Get the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @return the enableDtmfTones value. + */ + @Generated + public Boolean isEnableDtmfTones() { + return this.enableDtmfTones; + } + + /** + * Set the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @param enableDtmfTones the enableDtmfTones value to set. + * @return the WebSocketMediaStreamingOptionsInternal object itself. + */ + @Generated + public WebSocketMediaStreamingOptionsInternal setEnableDtmfTones(Boolean enableDtmfTones) { + this.enableDtmfTones = enableDtmfTones; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public WebSocketMediaStreamingOptionsInternal + setAudioChannelType(MediaStreamingAudioChannelTypeInternal audioChannelType) { + super.setAudioChannelType(audioChannelType); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("audioChannelType", + getAudioChannelType() == null ? null : getAudioChannelType().toString()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("contentType", this.contentType == null ? null : this.contentType.toString()); + jsonWriter.writeBooleanField("startMediaStreaming", this.startMediaStreaming); + jsonWriter.writeBooleanField("enableBidirectional", this.enableBidirectional); + jsonWriter.writeStringField("audioFormat", this.audioFormat == null ? null : this.audioFormat.toString()); + jsonWriter.writeBooleanField("enableDtmfTones", this.enableDtmfTones); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketMediaStreamingOptionsInternal from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketMediaStreamingOptionsInternal if the JsonReader was pointing to an instance of + * it, or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketMediaStreamingOptionsInternal. + */ + @Generated + public static WebSocketMediaStreamingOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketMediaStreamingOptionsInternal deserializedWebSocketMediaStreamingOptionsInternal + = new WebSocketMediaStreamingOptionsInternal(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("audioChannelType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal + .setAudioChannelType(MediaStreamingAudioChannelTypeInternal.fromString(reader.getString())); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.transportType + = StreamingTransportTypeInternal.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.transportUrl = reader.getString(); + } else if ("contentType".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.contentType + = MediaStreamingContentTypeInternal.fromString(reader.getString()); + } else if ("startMediaStreaming".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.startMediaStreaming + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableBidirectional".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.enableBidirectional + = reader.getNullable(JsonReader::getBoolean); + } else if ("audioFormat".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.audioFormat + = AudioFormatInternal.fromString(reader.getString()); + } else if ("enableDtmfTones".equals(fieldName)) { + deserializedWebSocketMediaStreamingOptionsInternal.enableDtmfTones + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketMediaStreamingOptionsInternal; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java new file mode 100644 index 000000000000..e6ea0a00543e --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/WebSocketTranscriptionOptionsInternal.java @@ -0,0 +1,229 @@ +// 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.azure.core.annotation.Generated; +import com.azure.json.JsonReader; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; + +/** + * Represents the options for WebSocket transport. + */ +@Fluent +public final class WebSocketTranscriptionOptionsInternal extends TranscriptionOptionsInternal { + /* + * Defines the transport type used for streaming. Note that future values may be introduced that are not currently + * documented. + */ + @Generated + private StreamingTransportTypeInternal transportType = StreamingTransportTypeInternal.WEBSOCKET; + + /* + * The URL used for live transcription transport. + */ + @Generated + private String transportUrl; + + /* + * The ID of the deployed custom model in GUID format. The GUID is generated by Azure Speech Studio, e.g., + * a259c255-1cdw-4ed7-a693-dd58563b6f6a. + */ + @Generated + private String speechModelEndpointId; + + /* + * Indicates whether the transcription should start immediately after the call is answered. + */ + @Generated + private Boolean startTranscription; + + /* + * Enables intermediate results for the transcribed speech. + */ + @Generated + private Boolean enableIntermediateResults; + + /** + * Creates an instance of WebSocketTranscriptionOptionsInternal class. + */ + @Generated + public WebSocketTranscriptionOptionsInternal() { + } + + /** + * Get the transportType property: Defines the transport type used for streaming. Note that future values may be + * introduced that are not currently documented. + * + * @return the transportType value. + */ + @Generated + @Override + public StreamingTransportTypeInternal getTransportType() { + return this.transportType; + } + + /** + * Get the transportUrl property: The URL used for live transcription transport. + * + * @return the transportUrl value. + */ + @Generated + public String getTransportUrl() { + return this.transportUrl; + } + + /** + * Set the transportUrl property: The URL used for live transcription transport. + * + * @param transportUrl the transportUrl value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + @Generated + public WebSocketTranscriptionOptionsInternal setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + + /** + * Get the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @return the speechModelEndpointId value. + */ + @Generated + public String getSpeechModelEndpointId() { + return this.speechModelEndpointId; + } + + /** + * Set the speechModelEndpointId property: The ID of the deployed custom model in GUID format. The GUID is generated + * by Azure Speech Studio, e.g., a259c255-1cdw-4ed7-a693-dd58563b6f6a. + * + * @param speechModelEndpointId the speechModelEndpointId value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + @Generated + public WebSocketTranscriptionOptionsInternal setSpeechModelEndpointId(String speechModelEndpointId) { + this.speechModelEndpointId = speechModelEndpointId; + return this; + } + + /** + * Get the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @return the startTranscription value. + */ + @Generated + public Boolean isStartTranscription() { + return this.startTranscription; + } + + /** + * Set the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @param startTranscription the startTranscription value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + @Generated + public WebSocketTranscriptionOptionsInternal setStartTranscription(Boolean startTranscription) { + this.startTranscription = startTranscription; + return this; + } + + /** + * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @return the enableIntermediateResults value. + */ + @Generated + public Boolean isEnableIntermediateResults() { + return this.enableIntermediateResults; + } + + /** + * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. + * + * @param enableIntermediateResults the enableIntermediateResults value to set. + * @return the WebSocketTranscriptionOptionsInternal object itself. + */ + @Generated + public WebSocketTranscriptionOptionsInternal setEnableIntermediateResults(Boolean enableIntermediateResults) { + this.enableIntermediateResults = enableIntermediateResults; + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public WebSocketTranscriptionOptionsInternal setLocale(String locale) { + super.setLocale(locale); + return this; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("locale", getLocale()); + jsonWriter.writeStringField("transportType", this.transportType == null ? null : this.transportType.toString()); + jsonWriter.writeStringField("transportUrl", this.transportUrl); + jsonWriter.writeStringField("speechModelEndpointId", this.speechModelEndpointId); + jsonWriter.writeBooleanField("startTranscription", this.startTranscription); + jsonWriter.writeBooleanField("enableIntermediateResults", this.enableIntermediateResults); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of WebSocketTranscriptionOptionsInternal from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of WebSocketTranscriptionOptionsInternal if the JsonReader was pointing to an instance of it, + * or null if it was pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the WebSocketTranscriptionOptionsInternal. + */ + @Generated + public static WebSocketTranscriptionOptionsInternal fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + WebSocketTranscriptionOptionsInternal deserializedWebSocketTranscriptionOptionsInternal + = new WebSocketTranscriptionOptionsInternal(); + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("locale".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.setLocale(reader.getString()); + } else if ("transportType".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.transportType + = StreamingTransportTypeInternal.fromString(reader.getString()); + } else if ("transportUrl".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.transportUrl = reader.getString(); + } else if ("speechModelEndpointId".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.speechModelEndpointId = reader.getString(); + } else if ("startTranscription".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.startTranscription + = reader.getNullable(JsonReader::getBoolean); + } else if ("enableIntermediateResults".equals(fieldName)) { + deserializedWebSocketTranscriptionOptionsInternal.enableIntermediateResults + = reader.getNullable(JsonReader::getBoolean); + } else { + reader.skipChildren(); + } + } + + return deserializedWebSocketTranscriptionOptionsInternal; + }); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java deleted file mode 100644 index 7e38a60a48d6..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantEventResult.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.AddParticipantFailed; -import com.azure.communication.callautomation.models.events.AddParticipantSucceeded; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Immutable; - -/** - * The result of an add participant event. - */ -@Immutable -public final class AddParticipantEventResult { - private final boolean isSuccess; - private final AddParticipantSucceeded successResult; - private final AddParticipantFailed failureResult; - private final CommunicationIdentifier participant; - - /** - * Initializes a new instance of AddParticipantEventResult. - * - * @param isSuccess the success status of the add participant operation. - * @param successResult the add participant succeeded event. - * @param failureResult the add participant failed event. - * @param participant the participant. - */ - AddParticipantEventResult(boolean isSuccess, AddParticipantSucceeded successResult, - AddParticipantFailed failureResult, CommunicationIdentifier participant) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - this.participant = participant; - } - - /** - * Gets the success status of the add participant operation. - * - * @return the success status of the add participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the add participant succeeded event. - * - * @return the add participant succeeded event. - */ - public AddParticipantSucceeded getSuccessResult() { - return successResult; - } - - /** - * Gets the add participant failed event. - * - * @return the add participant failed event. - */ - public AddParticipantFailed getFailureResult() { - return failureResult; - } - - /** - * Gets the participant. - * - * @return the participant. - */ - public CommunicationIdentifier getParticipant() { - return participant; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java index 9ca78f6740ea..0dd343cf690e 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java @@ -6,18 +6,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.converters.CallParticipantConverter; import com.azure.communication.callautomation.implementation.models.AddParticipantResponseInternal; -import com.azure.communication.callautomation.models.events.AddParticipantFailed; -import com.azure.communication.callautomation.models.events.AddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The AddParticipantResult model. */ @Immutable -public class AddParticipantResult extends ResultWithEventHandling { +public final class AddParticipantResult { /* * The participant property. */ @@ -95,40 +89,4 @@ public String getOperationContext() { public String getInvitationId() { return invitationId; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == AddParticipantSucceeded.class - || event.getClass() == AddParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == AddParticipantSucceeded.class - || event.getClass() == AddParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected AddParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - AddParticipantEventResult result = null; - if (event.getClass() == AddParticipantSucceeded.class) { - result = new AddParticipantEventResult(true, (AddParticipantSucceeded) event, null, - ((AddParticipantSucceeded) event).getParticipant()); - } else if (event.getClass() == AddParticipantFailed.class) { - result = new AddParticipantEventResult(false, null, (AddParticipantFailed) event, - ((AddParticipantFailed) event).getParticipant()); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java deleted file mode 100644 index 74fd35fe0e34..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallEventResult.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.core.annotation.Immutable; - -/** - * The result of an answer call event. - */ -@Immutable -public final class AnswerCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final AnswerFailed failureResult; - - /** - * Initializes a new instance of AnswerCallEventResult. - * - * @param isSuccess the success status of the answer call operation. - * @param successResult the call connected success event. - */ - AnswerCallEventResult(boolean isSuccess, CallConnected successResult, AnswerFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the answer call operation. - * - * @return the success status of the answer call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the answer failed failure event. - * - * @return the answer failed failure event. - */ - public AnswerFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java index 284af397e034..e8ab5c0e92fe 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallOptions.java @@ -3,8 +3,6 @@ package com.azure.communication.callautomation.models; -import java.util.HashMap; - import com.azure.core.annotation.Fluent; /** @@ -42,11 +40,6 @@ public final class AnswerCallOptions { */ private String operationContext; - /** - * Custom Context - */ - private final CustomCallingContext customCallingContext; - /** * Constructor * @@ -56,8 +49,6 @@ public final class AnswerCallOptions { public AnswerCallOptions(String incomingCallContext, String callbackUrl) { this.incomingCallContext = incomingCallContext; this.callbackUrl = callbackUrl; - this.customCallingContext - = new CustomCallingContext(new HashMap(), new HashMap()); } /** @@ -157,12 +148,4 @@ public AnswerCallOptions setMediaStreamingOptions(MediaStreamingOptions mediaStr this.mediaStreamingOptions = mediaStreamingOptions; return this; } - - /** - * get custom context - * @return custom context - */ - public CustomCallingContext getCustomCallingContext() { - return customCallingContext; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java index 1378a0f80324..5375dbd653cf 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AnswerCallResult.java @@ -5,14 +5,7 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.Objects; /** * The result of answering a call @@ -30,76 +23,4 @@ public AnswerCallResult(CallConnectionProperties callConnectionProperties, CallC CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public AnswerCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public AnswerCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == AnswerFailed.class)) - : eventProcessor - .waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == AnswerFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private AnswerCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new AnswerCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == AnswerFailed.class) { - return new AnswerCallEventResult(false, null, (AnswerFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/Channels.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioChannelType.java similarity index 57% rename from sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/Channels.java rename to sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioChannelType.java index d86c42b0b93a..fa50aac4dffe 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/Channels.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioChannelType.java @@ -3,17 +3,25 @@ package com.azure.communication.callautomation.models; -import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; +import com.azure.core.util.ExpandableStringEnum; + /** * Specifies the text format of transcription. */ -public final class Channels extends ExpandableStringEnum { +public final class AudioChannelType extends ExpandableStringEnum { + /** + * Display. + * Audio channel type. + */ + public static final AudioChannelType MONO = fromString("mono"); + /** * Display. + * Unknown Audio channel type. */ - public static final Channels MONO = fromString("mono"); + public static final AudioChannelType UNKNOWN = fromString("unknown"); /** * Creates a new instance of Channels value. @@ -21,7 +29,7 @@ public final class Channels extends ExpandableStringEnum { * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated - public Channels() { + public AudioChannelType() { } /** @@ -30,8 +38,8 @@ public Channels() { * @param name a name to look for. * @return the corresponding Channels. */ - public static Channels fromString(String name) { - return fromString(name, Channels.class); + public static AudioChannelType fromString(String name) { + return fromString(name, AudioChannelType.class); } /** @@ -39,7 +47,7 @@ public static Channels fromString(String name) { * * @return known Channels values. */ - public static Collection values() { - return values(Channels.class); + public static Collection values() { + return values(AudioChannelType.class); } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioData.java index c671ef5e131f..4ef8ec30ca7d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioData.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioData.java @@ -3,20 +3,21 @@ package com.azure.communication.callautomation.models; +import java.time.OffsetDateTime; +import java.time.format.DateTimeFormatter; + import com.azure.communication.callautomation.implementation.accesshelpers.AudioDataContructorProxy; import com.azure.communication.callautomation.implementation.converters.AudioDataConverter; import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.util.BinaryData; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Base64; - -/** The MediaStreamingAudio model. */ +/** The data which contains the audio data stream information such as timestamp, data.. + */ public final class AudioData extends StreamingData { /* - * The audio data, encoded as a base64 string. + * The audio data, encoded as a binary data. */ - private final byte[] data; + private final BinaryData data; /* * The timestamp indicating when the media content was received by the bot, or if the bot is sending media, @@ -42,7 +43,7 @@ public AudioData create(AudioDataConverter internalData) { } @Override - public AudioData create(byte[] data) { + public AudioData create(BinaryData data) { return new AudioData(data); } }); @@ -54,7 +55,8 @@ public AudioData create(byte[] data) { * @param internalData The audiodataconvertor */ AudioData(AudioDataConverter internalData) { - this.data = Base64.getDecoder().decode(internalData.getData()); + super(StreamingDataKind.AUDIO_DATA); + this.data = BinaryData.fromString(internalData.getData()); this.timestamp = OffsetDateTime.parse(internalData.getTimestamp(), DateTimeFormatter.ISO_OFFSET_DATE_TIME); if (internalData.getParticipantRawID() != null && !internalData.getParticipantRawID().isEmpty()) { this.participant = CommunicationIdentifier.fromRawId(internalData.getParticipantRawID()); @@ -64,22 +66,13 @@ public AudioData create(byte[] data) { this.silent = internalData.isSilent(); } - /** - * The constructor - */ - public AudioData() { - this.data = null; - this.timestamp = null; - this.participant = null; - this.silent = false; - } - /** * The constructor * * @param data The audio data. */ - AudioData(byte[] data) { + AudioData(BinaryData data) { + super(StreamingDataKind.AUDIO_DATA); this.data = data; this.timestamp = null; this.participant = null; @@ -87,15 +80,18 @@ public AudioData() { } /** + * The audio data, encoded audio binary data. * Get the data property. * - * @return the data value. + * @return the encoded audio binary data. */ - public byte[] getData() { + public BinaryData getData() { return data; } /** + * The timestamp indicating when the media content was received by the bot, or if the bot is sending media, + * the timestamp of when the media was sourced. The format is ISO 8601 (yyyy-mm-ddThh:mm) * Get the timestamp property. * * @return the timestamp value. @@ -105,6 +101,7 @@ public OffsetDateTime getTimestamp() { } /** + * The raw ID of the participant. * Get the participantRawID property. * * @return the participantRawID value. @@ -114,6 +111,7 @@ public CommunicationIdentifier getParticipant() { } /** + * Indicates if the received audio buffer contains only silence * Get the silent property. * * @return the silent value. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java index 763c2fa020c6..a2045733ef99 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AudioMetadata.java @@ -30,12 +30,7 @@ public final class AudioMetadata extends StreamingData { /* * Specifies the number of audio channels in the audio configuration. Currently, only "mono" (single channel) is supported. */ - private final Channels channels; - - /* - * The size of the audio data being sent, based on the sample rate and duration. - */ - private final Integer length; + private final AudioChannelType channels; static { AudioMetadataContructorProxy @@ -53,25 +48,15 @@ public AudioMetadata create(AudioMetadataConverter internalData) { * @param internalData The audiodataconvertor */ AudioMetadata(AudioMetadataConverter internalData) { + super(StreamingDataKind.AUDIO_METADATA); this.mediaSubscriptionId = internalData.getMediaSubscriptionId(); this.encoding = internalData.getEncoding(); this.sampleRate = internalData.getSampleRate(); this.channels = convertToChannelsEnum(internalData.getChannels()); - this.length = internalData.getLength(); - } - - /** - * Creats the audiometadata instance - */ - public AudioMetadata() { - this.mediaSubscriptionId = null; - this.encoding = null; - this.sampleRate = null; - this.channels = null; - this.length = null; } /** + * A unique identifier for the media subscription. * Get the mediaSubscriptionId property. * * @return the mediaSubscriptionId value. @@ -81,6 +66,7 @@ public String getMediaSubscriptionId() { } /** + * The format used to encode the audio. Currently, only "pcm" (Pulse Code Modulation) is supported. * Get the encoding property. * * @return the encoding value. @@ -90,6 +76,7 @@ public String getEncoding() { } /** + * The number of samples per second in the audio. Supported values are 16kHz or 24kHz. * Get the sampleRate property. * * @return the sampleRate value. @@ -99,31 +86,23 @@ public int getSampleRate() { } /** + * Specifies the number of audio channels in the audio configuration. Currently, only "mono" (single channel) is supported. * Get the channels property. * * @return the channels value. */ - public Channels getChannels() { + public AudioChannelType getChannelType() { return channels; } - /** - * Get the length property. - * - * @return the length value. - */ - public int getLength() { - return length; - } - /** * Converting the channels int type to enum * @param channels channels id for the audio * @return Channels enum */ - private Channels convertToChannelsEnum(Integer channels) { + private AudioChannelType convertToChannelsEnum(Integer channels) { if (1 == channels) { - return Channels.MONO; + return AudioChannelType.MONO; } else { throw LOGGER.logExceptionAsError(new IllegalArgumentException("Unsupported Channels ")); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java index 49b91b15fd26..c4be09281142 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallIntelligenceOptions.java @@ -16,11 +16,6 @@ public final class CallIntelligenceOptions { */ private String cognitiveServicesEndpoint; - /** - * A backup endpoint URL of the Azure Cognitive Services resource attached - */ - private String backupCognitiveServicesEndpoint; - /** * Creates an instance of {@link CallIntelligenceOptions}. */ @@ -48,26 +43,4 @@ public CallIntelligenceOptions setCognitiveServicesEndpoint(String cognitiveServ this.cognitiveServicesEndpoint = cognitiveServicesEndpoint; return this; } - - /** - * Get the backupCognitiveServicesEndpoint property: A backup endpoint URL of the Azure Cognitive Services resource - * attached. - * - * @return the backupCognitiveServicesEndpoint value. - */ - public String getBackupCognitiveServicesEndpoint() { - return this.backupCognitiveServicesEndpoint; - } - - /** - * Set the backupCognitiveServicesEndpoint property: A backup endpoint URL of the Azure Cognitive Services resource - * attached. - * - * @param backupCognitiveServicesEndpoint the backupCognitiveServicesEndpoint value to set. - * @return the CallIntelligenceOptions object itself. - */ - public CallIntelligenceOptions setBackupCognitiveServicesEndpoint(String backupCognitiveServicesEndpoint) { - this.backupCognitiveServicesEndpoint = backupCognitiveServicesEndpoint; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java index 023368b4be2e..2569b4468f03 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java @@ -4,15 +4,14 @@ package com.azure.communication.callautomation.models; +import java.util.HashMap; + import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.MicrosoftTeamsUserIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; -import java.util.HashMap; - /** * Call invite details. */ @@ -55,16 +54,6 @@ public CallInvite(MicrosoftTeamsUserIdentifier targetIdentity) { this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); } - /** - * Create a CallInvite object with MicrosoftTeamsAppIdentifier - * @param targetIdentity Target's MicrosoftTeamsAppIdentifier - */ - public CallInvite(MicrosoftTeamsAppIdentifier targetIdentity) { - this.targetParticipant = targetIdentity; - this.sourceCallerIdNumber = null; - this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); - } - /** * Get target's CommunicationIdentifier * @return target's CommunicationIdentifier diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java index b8c47be7eb43..0efd271b8048 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallResult.java @@ -5,7 +5,6 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.CallAutomationEventProcessor; /** * The abstract class used as parent of [action]CallResult @@ -26,19 +25,6 @@ public abstract class CallResult { */ private final CallConnectionAsync callConnectionAsync; - /** - * The event processor that handles events. - */ - protected CallAutomationEventProcessor eventProcessor; - /** - * The call's connection id. - */ - protected String callConnectionId; - /** - * Operation context from the api request. - */ - protected String operationContextFromRequest; - CallResult(CallConnectionProperties callConnectionProperties, CallConnection callConnection, CallConnectionAsync callConnectionAsync) { this.callConnectionProperties = callConnectionProperties; @@ -46,20 +32,6 @@ public abstract class CallResult { this.callConnectionAsync = callConnectionAsync; } - /** - * Sets the event processor - * - * @param eventProcessor the event processor - * @param callConnectionId the call connection id - * @param operationContext the operation context - */ - public void setEventProcessor(CallAutomationEventProcessor eventProcessor, String callConnectionId, - String operationContext) { - this.eventProcessor = eventProcessor; - this.callConnectionId = callConnectionId; - this.operationContextFromRequest = operationContext; - } - /** * Get the callConnectionProperties. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallSessionEndReasonInfo.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallSessionEndReasonInfo.java deleted file mode 100644 index 1cec30fdff25..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallSessionEndReasonInfo.java +++ /dev/null @@ -1,183 +0,0 @@ -// 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.models; - -import java.util.Collection; - -import com.azure.core.util.ExpandableStringEnum; - -/** - * Defines values for CallSessionEndReasonInfo. - */ -public final class CallSessionEndReasonInfo extends ExpandableStringEnum { - /** - * Static value sessionStillOngoing for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo SESSION_STILL_ONGOING = fromString("sessionStillOngoing"); - - /** - * Static value callEnded for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo CALL_ENDED = fromString("callEnded"); - - /** - * Static value initiatorLeft for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo INITIATOR_LEFT = fromString("initiatorLeft"); - - /** - * Static value handedOverOrTransfered for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo HANDED_OVER_OR_TRANSFERED = fromString("handedOverOrTransfered"); - - /** - * Static value maximumSessionTimeReached for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo MAXIMUM_SESSION_TIME_REACHED = fromString("maximumSessionTimeReached"); - - /** - * Static value callStartTimeout for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo CALL_START_TIMEOUT = fromString("callStartTimeout"); - - /** - * Static value mediaTimeout for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo MEDIA_TIMEOUT = fromString("mediaTimeout"); - - /** - * Static value audioStreamFailure for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo AUDIO_STREAM_FAILURE = fromString("audioStreamFailure"); - - /** - * Static value allInstancesBusy for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo ALL_INSTANCES_BUSY = fromString("allInstancesBusy"); - - /** - * Static value teamsTokenConversionFailed for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo TEAMS_TOKEN_CONVERSION_FAILED - = fromString("teamsTokenConversionFailed"); - - /** - * Static value reportCallStateFailed for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo REPORT_CALL_STATE_FAILED = fromString("reportCallStateFailed"); - - /** - * Static value reportCallStateFailedAndSessionMustBeDiscarded for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo REPORT_CALL_STATE_FAILED_AND_SESSION_MUST_BE_DISCARDED - = fromString("reportCallStateFailedAndSessionMustBeDiscarded"); - - /** - * Static value couldNotRejoinCall for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo COULD_NOT_REJOIN_CALL = fromString("couldNotRejoinCall"); - - /** - * Static value invalidBotData for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo INVALID_BOT_DATA = fromString("invalidBotData"); - - /** - * Static value couldNotStart for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo COULD_NOT_START = fromString("couldNotStart"); - - /** - * Static value appHostedMediaFailureOutcomeWithError for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo APP_HOSTED_MEDIA_FAILURE_OUTCOME_WITH_ERROR - = fromString("appHostedMediaFailureOutcomeWithError"); - - /** - * Static value appHostedMediaFailureOutcomeGracefully for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo APP_HOSTED_MEDIA_FAILURE_OUTCOME_GRACEFULLY - = fromString("appHostedMediaFailureOutcomeGracefully"); - - /** - * Static value handedOverDueToMediaTimeout for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo HANDED_OVER_DUE_TO_MEDIA_TIMEOUT - = fromString("handedOverDueToMediaTimeout"); - - /** - * Static value handedOverDueToAudioStreamFailure for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo HANDED_OVER_DUE_TO_AUDIO_STREAM_FAILURE - = fromString("handedOverDueToAudioStreamFailure"); - - /** - * Static value speechRecognitionSessionNonRetriableError for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo SPEECH_RECOGNITION_SESSION_NON_RETRIABLE_ERROR - = fromString("speechRecognitionSessionNonRetriableError"); - - /** - * Static value speechRecognitionSessionRetriableErrorMaxRetryCountReached for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo SPEECH_RECOGNITION_SESSION_RETRIABLE_ERROR_MAX_RETRY_COUNT_REACHED - = fromString("speechRecognitionSessionRetriableErrorMaxRetryCountReached"); - - /** - * Static value handedOverDueToChunkCreationFailure for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo HANDED_OVER_DUE_TO_CHUNK_CREATION_FAILURE - = fromString("handedOverDueToChunkCreationFailure"); - - /** - * Static value chunkCreationFailed for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo CHUNK_CREATION_FAILED = fromString("chunkCreationFailed"); - - /** - * Static value handedOverDueToProcessingTimeout for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo HANDED_OVER_DUE_TO_PROCESSING_TIMEOUT - = fromString("handedOverDueToProcessingTimeout"); - - /** - * Static value processingTimeout for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo PROCESSING_TIMEOUT = fromString("processingTimeout"); - - /** - * Static value transcriptObjectCreationFailed for CallSessionEndReasonInfo. - */ - public static final CallSessionEndReasonInfo TRANSCRIPT_OBJECT_CREATION_FAILED - = fromString("transcriptObjectCreationFailed"); - - /** - * Creates a new instance of CallSessionEndReasonInfo value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CallSessionEndReasonInfo() { - } - - /** - * Creates or finds a CallSessionEndReasonInfo from its string representation. - * - * @param name a name to look for. - * @return the corresponding CallSessionEndReasonInfo. - */ - public static CallSessionEndReasonInfo fromString(String name) { - return fromString(name, CallSessionEndReasonInfo.class); - } - - /** - * Gets known CallSessionEndReasonInfo values. - * - * @return known CallSessionEndReasonInfo values. - */ - public static Collection values() { - return values(CallSessionEndReasonInfo.class); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java deleted file mode 100644 index 3d4c4f04bee2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantEventResult.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a cancel add participant event. - */ -@Immutable -public final class CancelAddParticipantEventResult { - private final boolean isSuccess; - private final CancelAddParticipantSucceeded successResult; - private final CancelAddParticipantFailed failureResult; - private final String invitationId; - - /** - * Initializes a new instance of CancelAddParticipantEventResult. - * - * @param isSuccess the success status of the cancel add participant operation. - * @param successResult the add participant cancelled success event. - * @param failureResult the cancel add participant failed event. - * @param participant the participant. - * @param invitationId the invitation id. - */ - CancelAddParticipantEventResult(boolean isSuccess, CancelAddParticipantSucceeded successResult, - CancelAddParticipantFailed failureResult, String invitationId) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - this.invitationId = invitationId; - } - - /** - * Gets the success status of the cancel add participant operation. - * - * @return the success status of the cancel add participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the add participant cancelled success event. - * - * @return the add participant cancelled success event. - */ - public CancelAddParticipantSucceeded getSuccessResult() { - return successResult; - } - - /** - * Gets the cancel add participant failed event. - * - * @return the cancel add participant failed event. - */ - public CancelAddParticipantFailed getFailureResult() { - return failureResult; - } - - /** - * Gets the invitation id. - * - * @return the invitation id. - */ - public String getInvitationId() { - return invitationId; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java index defcd4325638..ce258f9a8d1d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOperationResult.java @@ -6,19 +6,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy.CancelAddParticipantResponseConstructorAccessor; import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse; -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The CancelAddParticipantResult model. */ @Immutable -public final class CancelAddParticipantOperationResult - extends ResultWithEventHandling { +public final class CancelAddParticipantOperationResult { /** * The invitation ID used to cancel the add participant request. @@ -78,39 +71,4 @@ public String getInvitationId() { public String getOperationContext() { return operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CancelAddParticipantSucceeded.class - || event.getClass() == CancelAddParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CancelAddParticipantSucceeded.class - || event.getClass() == CancelAddParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected CancelAddParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - CancelAddParticipantEventResult result = null; - if (event.getClass() == CancelAddParticipantSucceeded.class) { - result = new CancelAddParticipantEventResult(true, (CancelAddParticipantSucceeded) event, null, - ((CancelAddParticipantSucceeded) event).getInvitationId()); - } else if (event.getClass() == CancelAddParticipantFailed.class) { - result = new CancelAddParticipantEventResult(false, null, (CancelAddParticipantFailed) event, - ((CancelAddParticipantFailed) event).getInvitationId()); - } - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java index b08be534852d..e5f856e321db 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ChoiceResult.java @@ -40,17 +40,6 @@ public String getLabel() { return this.label; } - /** - * Set the label property: Label is the primary identifier for the choice detected. - * - * @param label the label value to set. - * @return the ChoiceResult object itself. - */ - public ChoiceResult setLabel(String label) { - this.label = label; - return this; - } - /** * Get the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection. If * Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to @@ -62,19 +51,6 @@ public String getRecognizedPhrase() { return this.recognizedPhrase; } - /** - * Set the recognizedPhrase property: Phrases are set to the value if choice is selected via phrase detection. If - * Dtmf input is recognized, then Label will be the identifier for the choice detected and phrases will be set to - * null. - * - * @param recognizedPhrase the recognizedPhrase value to set. - * @return the ChoiceResult object itself. - */ - public ChoiceResult setRecognizedPhrase(String recognizedPhrase) { - this.recognizedPhrase = recognizedPhrase; - return this; - } - @Override public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java deleted file mode 100644 index 7c132d0c6045..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallEventResult.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.ConnectFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a connect call event. - */ -@Immutable -public final class ConnectCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final ConnectFailed failureResult; - - /** - * Initializes a new instance of ConnectCallEventResult. - * - * @param isSuccess the success status of the connect call operation. - * @param successResult the call connected success event. - */ - ConnectCallEventResult(boolean isSuccess, CallConnected successResult, ConnectFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the connect call operation. - * - * @return the success status of the connect call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the connect failed event. - * @return the connect call failure event. - */ - public ConnectFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java index 66b88bd51b20..313d8a224bd2 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ConnectCallResult.java @@ -3,18 +3,10 @@ package com.azure.communication.callautomation.models; -import java.time.Duration; -import java.util.Objects; - import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.ConnectFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - /** The result of connect request. */ @Immutable public final class ConnectCallResult extends CallResult { @@ -29,76 +21,4 @@ public ConnectCallResult(CallConnectionProperties callConnectionProperties, Call CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public ConnectCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public ConnectCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == ConnectFailed.class)) - : eventProcessor - .waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == ConnectFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private ConnectCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new ConnectCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == ConnectFailed.class) { - return new ConnectCallEventResult(false, null, (ConnectFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java deleted file mode 100644 index 10cf91ecbdfc..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallEventResult.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a create call event. - */ -@Immutable -public final class CreateCallEventResult { - private final boolean isSuccess; - private final CallConnected successResult; - private final CreateCallFailed failureResult; - - /** - * Initializes a new instance of CreateCallEventResult. - * - * @param isSuccess the success status of the create call operation. - * @param successResult the call connected success event. - */ - CreateCallEventResult(boolean isSuccess, CallConnected successResult, CreateCallFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the create call operation. - * - * @return the success status of the create call operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the call connected success event. - * - * @return the call connected success event. - */ - public CallConnected getSuccessResult() { - return successResult; - } - - /** - * Gets the create call failure event. - * - * @return the create call failure event. - */ - public CreateCallFailed getFailureResult() { - return failureResult; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java index fecc04be6d47..fe0f9e8ea87d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallOptions.java @@ -3,7 +3,6 @@ package com.azure.communication.callautomation.models; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.core.annotation.Fluent; /** @@ -41,13 +40,6 @@ public final class CreateCallOptions { */ private TranscriptionOptions transcriptionOptions; - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - */ - private MicrosoftTeamsAppIdentifier teamsAppSource; - /** * Constructor * @param callInvite Call invitee information. @@ -154,26 +146,4 @@ public CreateCallOptions setMediaStreamingOptions(MediaStreamingOptions mediaStr this.mediaStreamingOptions = mediaStreamingOptions; return this; } - - /** - * Get the TeamsAppSource property: it overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * - * @return the teamsAppSource. - */ - public MicrosoftTeamsAppIdentifier getTeamsAppSource() { - return teamsAppSource; - } - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - * - * @param teamsAppSource The MicrosoftTeamsAppIdentifier type source for overriding default client source. - * @return the CreateCallOptions object itself. - */ - public CreateCallOptions setTeamsAppSource(MicrosoftTeamsAppIdentifier teamsAppSource) { - this.teamsAppSource = teamsAppSource; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java index 8a3704316ec0..1cb02b0aefff 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateCallResult.java @@ -5,14 +5,7 @@ import com.azure.communication.callautomation.CallConnection; import com.azure.communication.callautomation.CallConnectionAsync; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CreateCallFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; -import java.util.Objects; /** * The result of answering a call @@ -31,75 +24,4 @@ public CreateCallResult(CallConnectionProperties callConnectionProperties, CallC CallConnectionAsync callConnectionAsync) { super(callConnectionProperties, callConnection, callConnectionAsync); } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public CreateCallEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public CreateCallEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == CreateCallFailed.class)) - : eventProcessor.waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallConnected.class || event.getClass() == CreateCallFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - private CreateCallEventResult getReturnedEvent(CallAutomationEventBase event) { - if (event.getClass() == CallConnected.class) { - return new CreateCallEventResult(true, (CallConnected) event, null); - } - - if (event.getClass() == CreateCallFailed.class) { - return new CreateCallEventResult(false, null, (CreateCallFailed) event); - } - - return null; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java index 3c1142ac45a8..39109119a4c6 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CreateGroupCallOptions.java @@ -3,14 +3,12 @@ package com.azure.communication.callautomation.models; +import java.util.List; + import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; -import java.util.HashMap; -import java.util.List; - /** * The options for creating a group call. */ @@ -56,18 +54,6 @@ public final class CreateGroupCallOptions { */ private CallIntelligenceOptions callIntelligenceOptions; - /** - * Custom Context - */ - private final CustomCallingContext customContext; - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - */ - private MicrosoftTeamsAppIdentifier teamsAppSource; - /** * Constructor * @@ -79,7 +65,6 @@ public CreateGroupCallOptions(List targetParticipants, this.callbackUrl = callbackUrl; this.sourceDisplayName = null; this.sourceCallIdNumber = null; - this.customContext = new CustomCallingContext(new HashMap(), new HashMap()); } /** @@ -215,34 +200,4 @@ public MediaStreamingOptions getMediaStreamingOptions() { public TranscriptionOptions getTranscriptionOptions() { return transcriptionOptions; } - - /** - * get custom context - * @return custom context - */ - public CustomCallingContext getCustomContext() { - return customContext; - } - - /** - * Get the TeamsAppSource property: it overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * - * @return the teamsAppSource. - */ - public MicrosoftTeamsAppIdentifier getTeamsAppSource() { - return teamsAppSource; - } - - /** - * Overrides default client source by a MicrosoftTeamsAppIdentifier type source. - * Required for creating call with Teams resource account ID. - * This is per-operation setting and does not change the client's default source. - * - * @param teamsAppSource The MicrosoftTeamsAppIdentifier type source for overriding default client source. - * @return the CreateCallOptions object itself. - */ - public CreateGroupCallOptions setTeamsAppSource(MicrosoftTeamsAppIdentifier teamsAppSource) { - this.teamsAppSource = teamsAppSource; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CustomCallingContext.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CustomCallingContext.java index aa674b761678..1a50447e31ac 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CustomCallingContext.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CustomCallingContext.java @@ -6,33 +6,18 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.HashMap; import java.util.Map; /** * Custom calling context details. */ @Fluent -public final class CustomCallingContext implements JsonSerializable { - private Map sipHeaders; - private Map voipHeaders; +public final class CustomCallingContext { + private final Map sipHeaders; + private final Map voipHeaders; private final ClientLogger logger; - /** - * Creates an instance of CustomCallingContext class. - */ - public CustomCallingContext() { - this.sipHeaders = new HashMap(); - this.voipHeaders = new HashMap(); - this.logger = new ClientLogger(CustomCallingContext.class); - } - /** * Create a CustomCallingContext object with SIP and VOIP headers * @@ -81,44 +66,13 @@ public void addSipUui(String value) { * * @param key custom context sip x header's key. * @param value custom context sip x header's value. - */ - public void addSipX(String key, String value) { - addSipX(key, value, SipHeaderPrefix.XMSCustom); - } - - /** - * Add a custom context sip X header. The provided key is appended to 'X-MS-Custom-' in last. - * - * @param key custom context sip x header's key. - * @param value custom context sip x header's value. - * @param prefix The prefix to use for the header. * @throws IllegalStateException If sipHeaders is null */ - public void addSipX(String key, String value, SipHeaderPrefix prefix) { + public void addSipX(String key, String value) { if (sipHeaders == null) { throw logger.logExceptionAsError(new IllegalStateException("Cannot add sip header, SipHeaders is null.")); } - if (prefix == SipHeaderPrefix.X) { - sipHeaders.put("X-" + key, value); - } else { - sipHeaders.put("X-MS-Custom-" + key, value); - } - } - - /** - * Type for SipHeaderPrefix. - * XMSCustom is the default prefix for custom headers. - */ - public enum SipHeaderPrefix { - /** - * Use the generic "X-" prefix. - */ - X, - - /** - * Use the legacy "X-MS-Custom" prefix. - */ - XMSCustom + sipHeaders.put("X-MS-Custom-" + key, value); } /** @@ -134,45 +88,4 @@ public void addVoip(String key, String value) { } voipHeaders.put(key, value); } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("voipHeaders", this.voipHeaders, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("sipHeaders", this.sipHeaders, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomCallingContext from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomCallingContext if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomCallingContext. - */ - public static CustomCallingContext fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomCallingContext deserializedCustomCallingContext = new CustomCallingContext(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("voipHeaders".equals(fieldName)) { - Map voipHeaders = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomCallingContext.voipHeaders = voipHeaders; - } else if ("sipHeaders".equals(fieldName)) { - Map sipHeaders = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomCallingContext.sipHeaders = sipHeaders; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomCallingContext; - }); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java deleted file mode 100644 index 1a96ec6d5ddc..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogInputType.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.models; - -import com.azure.core.util.ExpandableStringEnum; - -import java.util.Collection; - -/** Determines the type of the dialog. */ -public final class DialogInputType extends ExpandableStringEnum { - /** Static value powerVirtualAgents for DialogInputType. */ - public static final DialogInputType POWER_VIRTUAL_AGENTS = fromString("powerVirtualAgents"); - - /** Static value azureOpenAI for DialogInputType. */ - public static final DialogInputType AZURE_OPEN_AI = fromString("azureOpenAI"); - - /** - * Creates a new instance of DialogInputType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DialogInputType() { - } - - /** - * Creates or finds a DialogInputType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DialogInputType. - */ - public static DialogInputType fromString(String name) { - return fromString(name, DialogInputType.class); - } - - /** - * Gets known DialogInputType values. - * - * @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/models/DialogStateResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogStateResult.java deleted file mode 100644 index 76231fd9c846..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DialogStateResult.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.implementation.accesshelpers.DialogStateResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.DialogStateResponse; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; -import java.util.Objects; - -/** The DialogStateResult model. */ -@Immutable -public class DialogStateResult implements JsonSerializable { - - /* - * The dialog ID. - */ - private String dialogId; - - /* - * Defines options for dialog. - */ - private StartDialogOptions dialogOptions; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * The value to identify context of the operation. - */ - private String operationContext; - - static { - DialogStateResponseConstructorProxy - .setAccessor(new DialogStateResponseConstructorProxy.DialogStateResponseConstructorAccessor() { - @Override - public DialogStateResult create(DialogStateResponse internalHeaders) { - return new DialogStateResult(internalHeaders); - } - }); - } - - /** - * Public constructor. - * - */ - public DialogStateResult() { - this.dialogId = null; - this.operationContext = null; - } - - /** - * Constructor of the class - * - * @param dialogStateResponse The response from the dialog service - */ - DialogStateResult(DialogStateResponse dialogStateResponse) { - Objects.requireNonNull(dialogStateResponse, "dialogStateResponse must not be null"); - - this.dialogId = dialogStateResponse.getDialogId(); - this.operationContext = dialogStateResponse.getOperationContext(); - } - - /** - * Get the dialogId property: The dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return dialogId; - } - - /** - * Get the operationContext property: The value to identify context of the operation. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return operationContext; - } - - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dialogId", this.dialogId); - jsonWriter.writeStringField("operationContext", this.operationContext); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogStateResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogStateResult if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogStateResult. - */ - public static DialogStateResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogStateResult result = new DialogStateResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("dialogId".equals(fieldName)) { - result.dialogId = reader.getString(); - } else if ("operationContext".equals(fieldName)) { - result.operationContext = reader.getString(); - } else { - reader.skipChildren(); - } - } - return result; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DtmfData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DtmfData.java new file mode 100644 index 000000000000..192f981a7974 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/DtmfData.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callautomation.models; + +import com.azure.communication.callautomation.implementation.accesshelpers.DtmfDataContructorProxy; +import com.azure.communication.callautomation.implementation.converters.DtmfDataConverter; + +/** The dtmf data model. */ +public final class DtmfData extends StreamingData { + /* + * The dtmf data. + */ + private final String data; + + static { + DtmfDataContructorProxy.setAccessor(new DtmfDataContructorProxy.DtmfDataContructorProxyAccessor() { + @Override + public DtmfData create(DtmfDataConverter internalData) { + return new DtmfData(internalData); + } + + @Override + public DtmfData create(String data) { + return new DtmfData(data); + } + }); + } + + /** + * Package-private constructor of the class, used internally. + * + * @param internalData The DtmfDataconvertor + */ + DtmfData(DtmfDataConverter internalData) { + super(StreamingDataKind.DTMF_DATA); + this.data = internalData.getData(); + } + + /** + * The constructor + * + * @param data The dtmf data. + */ + DtmfData(String data) { + super(StreamingDataKind.DTMF_DATA); + this.data = data; + } + + /** + * Get the data property. + * + * @return the data value. + */ + public String getData() { + return data; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java deleted file mode 100644 index e2b89e5047c3..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/InterruptAudioAndAnnounceOptions.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Fluent; - -import java.util.ArrayList; -import java.util.List; - -/** The InterruptAudioAndAnnounceOptions model. */ -@Fluent -public final class InterruptAudioAndAnnounceOptions { - /* - * A List of {@link PlaySource} representing the sources to play. - * Currently only single play source per request is supported. - */ - private final List playSources; - - /* - * The targets to play to - */ - private final CommunicationIdentifier playTo; - - /* - * The operation context - */ - private String operationContext; - - /** - * Constructor - * @param playSources A List of {@link PlaySource} representing the sources to play. - * @param playTo The target to play to. - */ - public InterruptAudioAndAnnounceOptions(List playSources, CommunicationIdentifier playTo) { - this.playSources = playSources; - this.playTo = playTo; - } - - /** - * Constructor - * @param playSource A {@link PlaySource} representing the source to play. - * @param playTo The target to play to. - */ - public InterruptAudioAndAnnounceOptions(PlaySource playSource, CommunicationIdentifier playTo) { - this.playSources = new ArrayList<>(); - this.playSources.add(playSource); - this.playTo = playTo; - } - - /** - * Get the play sources. - * - * @return the playSources value. - */ - public List getPlaySources() { - return this.playSources; - } - - /** - * Get the target to play to. - * - * @return the playTo value. - */ - public CommunicationIdentifier getPlayTo() { - return this.playTo; - } - - /** - * Get the operationContext property. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return this.operationContext; - } - - /** - * Set the operationContext property. - * - * @param operationContext the operationContext value to set. - * @return the InterruptAudioAndAnnounceOptions object itself. - */ - public InterruptAudioAndAnnounceOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java similarity index 58% rename from sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java rename to sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java index bbc5f310f95a..82d231522207 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContent.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingContentType.java @@ -9,17 +9,17 @@ import java.util.Collection; /** Defines values for MediaStreamingContentType. */ -public final class MediaStreamingContent extends ExpandableStringEnum { +public final class MediaStreamingContentType extends ExpandableStringEnum { /** Static value audio for MediaStreamingContentType. */ - public static final MediaStreamingContent AUDIO = fromString("audio"); + public static final MediaStreamingContentType AUDIO = fromString("audio"); /** - * Creates an instance of {@link MediaStreamingContent} with no string value. + * Creates an instance of {@link MediaStreamingContentType} with no string value. * - * @deprecated Please use {@link #fromString(String)} to create an instance of MediaStreamingContent. + * @deprecated Please use {@link #fromString(String)} to create an instance of MediaStreamingContentType. */ @Deprecated - public MediaStreamingContent() { + public MediaStreamingContentType() { } /** @@ -28,15 +28,15 @@ public MediaStreamingContent() { * @param name a name to look for. * @return the corresponding MediaStreamingContentType. */ - public static MediaStreamingContent fromString(String name) { - return fromString(name, MediaStreamingContent.class); + public static MediaStreamingContentType fromString(String name) { + return fromString(name, MediaStreamingContentType.class); } /** * Get the collection of MediaStreamingContentType values. * @return known MediaStreamingContentType values. */ - public static Collection values() { - return values(MediaStreamingContent.class); + public static Collection values() { + return values(MediaStreamingContentType.class); } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java index 2535d2bc2e83..a9f0cbc2510d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingOptions.java @@ -11,17 +11,17 @@ public final class MediaStreamingOptions { /* * Transport URL for media streaming */ - private final String transportUrl; + private String transportUrl; /* * The type of transport to be used for media streaming, eg. Websocket */ - private final MediaStreamingTransport transportType; + private final StreamingTransport transportType; /* * Content type to stream, eg. audio, audio/video */ - private final MediaStreamingContent contentType; + private MediaStreamingContentType contentType; /* * Audio channel type to stream, eg. unmixed audio, mixed audio @@ -31,7 +31,7 @@ public final class MediaStreamingOptions { /* * The type of transport to be used for media streaming, eg. Websocket */ - private final Boolean startMediaStreaming; + private Boolean startMediaStreaming; /* * A value indicating whether bidirectional streaming is enabled. @@ -43,21 +43,29 @@ public final class MediaStreamingOptions { */ private AudioFormat audioFormat; + /* + * A value that indicates whether to stream the DTMF tones. + */ + private Boolean enableDtmfTones; + /** - * Creates a new instance of MediaStreamingConfiguration - * @param transportUrl - The Transport URL - * @param transportType - Transport type - * @param contentType - Content Type + * Creates a new instance of MediaStreamingOptions * @param audioChannelType - Audio Channel Type - * @param startMediaStreaming - Start media streaming flag + * @param transportType - The type of transport to be used for media streaming, eg. Websocket */ - public MediaStreamingOptions(String transportUrl, MediaStreamingTransport transportType, - MediaStreamingContent contentType, MediaStreamingAudioChannel audioChannelType, Boolean startMediaStreaming) { - this.transportUrl = transportUrl; - this.transportType = transportType; - this.contentType = contentType; + public MediaStreamingOptions(MediaStreamingAudioChannel audioChannelType, StreamingTransport transportType) { + this.transportType = StreamingTransport.WEBSOCKET; + this.contentType = MediaStreamingContentType.AUDIO; this.audioChannelType = audioChannelType; - this.startMediaStreaming = startMediaStreaming; + this.startMediaStreaming = false; + } + + /** + * Creates a new instance of TranscriptionOptions with default transportType as WEBSOCKET. + * @param audioChannelType - Audio Channel Type + */ + public MediaStreamingOptions(MediaStreamingAudioChannel audioChannelType) { + this(audioChannelType, StreamingTransport.WEBSOCKET); } /** @@ -69,12 +77,23 @@ public String getTransportUrl() { return this.transportUrl; } + /** + * Set the transportUrl property: Transport URL for media streaming. + * + * @param transportUrl the transportUrl value to set. + * @return the MediaStreamingOptions object itself. + */ + public MediaStreamingOptions setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + /** * Get the transportType property: The type of tranport to be used for media streaming, eg. Websocket. * * @return the transportType value. */ - public MediaStreamingTransport getTransportType() { + public StreamingTransport getTransportType() { return this.transportType; } @@ -83,13 +102,13 @@ public MediaStreamingTransport getTransportType() { * * @return the contentType value. */ - public MediaStreamingContent getContentType() { + public MediaStreamingContentType getContentType() { return this.contentType; } /** * Get the startMediaStreaming property: Enables intermediate results for the transcribed speech. - * + * * @return the startMediaStreaming value. */ public Boolean isStartMediaStreamingEnabled() { @@ -105,9 +124,62 @@ public MediaStreamingAudioChannel getAudioChannelType() { return this.audioChannelType; } + /** + * Set the contentType property: The contentType property. + * + * @param contentType the contentType value to set. + * @return the MediaStreamingOptions object itself. + */ + public MediaStreamingOptions setContentType(MediaStreamingContentType contentType) { + this.contentType = contentType; + return this; + } + + /** + * Get the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @return the startMediaStreaming value. + */ + public Boolean isStartMediaStreaming() { + return this.startMediaStreaming; + } + + /** + * Set the startMediaStreaming property: A value indicating whether the media streaming should start immediately + * after the call is answered. + * + * @param startMediaStreaming the startMediaStreaming value to set. + * @return the MediaStreamingOptions object itself. + */ + public MediaStreamingOptions setStartMediaStreaming(Boolean startMediaStreaming) { + this.startMediaStreaming = startMediaStreaming; + return this; + } + + /** + * Get the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @return the enableDtmfTones value. + */ + public Boolean isEnableDtmfTones() { + return this.enableDtmfTones; + } + + /** + * Set the enableDtmfTones property: A value that indicates whether to stream the DTMF tones. + * + * @param enableDtmfTones the enableDtmfTones value to set. + * @return the MediaStreamingOptions object itself. + */ + public MediaStreamingOptions setEnableDtmfTones(Boolean enableDtmfTones) { + this.enableDtmfTones = enableDtmfTones; + return this; + } + /** * Get the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * + * * @return the enableBidirectional value. */ public Boolean isEnableBidirectional() { @@ -116,7 +188,7 @@ public Boolean isEnableBidirectional() { /** * Set the enableBidirectional property: A value indicating whether bidirectional streaming is enabled. - * + * * @param enableBidirectional the enableBidirectional value to set. * @return the MediaStreamingOptions object itself. */ @@ -128,7 +200,7 @@ public MediaStreamingOptions setEnableBidirectional(Boolean enableBidirectional) /** * Get the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel * type. - * + * * @return the audioFormat value. */ public AudioFormat getAudioFormat() { @@ -138,7 +210,7 @@ public AudioFormat getAudioFormat() { /** * Set the audioFormat property: Specifies the audio format used for encoding, including sample rate and channel * type. - * + * * @param audioFormat the audioFormat value to set. * @return the MediaStreamingOptions object itself. */ diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java index 6e72f3a21369..bdc870b3d49b 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/MediaStreamingSubscription.java @@ -4,7 +4,7 @@ package com.azure.communication.callautomation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.communication.callautomation.implementation.models.MediaStreamingSubscriptionInternal; import com.azure.communication.callautomation.implementation.accesshelpers.MediaStreamingSubscriptionConstructorProxy; import java.util.List; @@ -19,7 +19,7 @@ /** * Media streaming Subscription Object. */ -@Fluent +@Immutable public final class MediaStreamingSubscription implements JsonSerializable { /* * Gets or Sets subscription Id. @@ -34,7 +34,7 @@ public final class MediaStreamingSubscription implements JsonSerializable subscribedContentTypes; + private List subscribedContentTypes; static { MediaStreamingSubscriptionConstructorProxy.setAccessor( @@ -49,7 +49,7 @@ public MediaStreamingSubscription create(MediaStreamingSubscriptionInternal inte /** * Creates an instance of MediaStreamingSubscription class. */ - public MediaStreamingSubscription() { + MediaStreamingSubscription() { id = null; state = null; subscribedContentTypes = null; @@ -69,14 +69,14 @@ public MediaStreamingSubscription() { this.subscribedContentTypes = mediaStreamingSubscriptionInternal.getSubscribedContentTypes() != null ? mediaStreamingSubscriptionInternal.getSubscribedContentTypes() .stream() - .map(contentType -> MediaStreamingContent.fromString(contentType.toString())) + .map(contentType -> MediaStreamingContentType.fromString(contentType.toString())) .collect(Collectors.toList()) : null; } /** * Get the id property: Gets or Sets subscription Id. - * + * * @return the id value. */ public String getId() { @@ -85,7 +85,7 @@ public String getId() { /** * Get the state property: Gets or Sets media streaming subscription state. - * + * * @return the state value. */ public MediaStreamingSubscriptionState getState() { @@ -94,10 +94,10 @@ public MediaStreamingSubscriptionState getState() { /** * Get the subscribedContentTypes property: Gets or Sets the subscribed media streaming content types. - * + * * @return the subscribedContentTypes value. */ - public List getSubscribedContentTypes() { + public List getSubscribedContentTypes() { return this.subscribedContentTypes; } @@ -113,7 +113,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { /** * Reads an instance of MediaStreamingSubscriptionInternal from the JsonReader. - * + * * @param jsonReader The JsonReader being read. * @return An instance of MediaStreamingSubscriptionInternal if the JsonReader was pointing to an instance of it, or * null if it was pointing to JSON null. @@ -132,8 +132,8 @@ public static MediaStreamingSubscription fromJson(JsonReader jsonReader) throws deserializedMediaStreamingSubscription.state = MediaStreamingSubscriptionState.fromString(reader.getString()); } else if ("subscribedContentTypes".equals(fieldName)) { - List subscribedContentTypes - = reader.readArray(reader1 -> MediaStreamingContent.fromString(reader1.getString())); + List subscribedContentTypes + = reader.readArray(reader1 -> MediaStreamingContentType.fromString(reader1.getString())); deserializedMediaStreamingSubscription.subscribedContentTypes = subscribedContentTypes; } else { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/OutStreamingData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/OutStreamingData.java index 4bf96e64cf25..a19e0493c191 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/OutStreamingData.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/OutStreamingData.java @@ -8,13 +8,14 @@ import java.io.Writer; import java.util.Base64; -import com.azure.core.annotation.Fluent; +import com.azure.core.util.BinaryData; +import com.azure.core.util.logging.ClientLogger; import com.azure.json.JsonProviders; import com.azure.json.JsonWriter; -/** The PlaySource model. */ -@Fluent -public class OutStreamingData { +/** This class stream audio data back to Azure Communication Services, which plays the audio into the cal */ +public final class OutStreamingData { + private static final ClientLogger LOGGER = new ClientLogger(OutStreamingData.class); /** * Out streaming data kind ex. StopAudio, AudioData @@ -36,7 +37,7 @@ public class OutStreamingData { * * @param kind media kind type on the out streaming data */ - public OutStreamingData(MediaKind kind) { + OutStreamingData(MediaKind kind) { this.kind = kind; } @@ -64,7 +65,7 @@ AudioData getAudioData() { * @param audioData the audioData to set * @return the OutStreamingData object itself. */ - OutStreamingData setAudioData(byte[] audioData) { + OutStreamingData setAudioData(BinaryData audioData) { this.audioData = new AudioData(audioData); return this; } @@ -80,28 +81,34 @@ OutStreamingData setStopAudio() { } /** + * Serialized audio data to play back into the cal * Get the streaming data for outbound * @param audioData the audioData to set * @return the string of outstreaming data - * @throws IOException when failed to serilize the data - * */ - public static String getStreamingDataForOutbound(byte[] audioData) throws IOException { - OutStreamingData data = new OutStreamingData(MediaKind.AUDIO_DATA); - data.setAudioData(audioData); - return serializeOutStreamingData(data); + public static String getStreamingDataForOutbound(BinaryData audioData) { + try { + OutStreamingData data = new OutStreamingData(MediaKind.AUDIO_DATA); + data.setAudioData(audioData); + return serializeOutStreamingData(data); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new RuntimeException("Failed to serialize OutStreamingData", e)); + } } /** + * Serialized stop data to stop playing audio back into the call * Get the stop audiofor outbound * @return the string of outstreaming data - * @throws IOException throws exception when failed to serialize - * */ - public static String getStopAudioForOutbound() throws IOException { - OutStreamingData data = new OutStreamingData(MediaKind.STOP_AUDIO); - data.setStopAudio(); - return serializeOutStreamingData(data); + public static String getStopAudioForOutbound() { + try { + OutStreamingData data = new OutStreamingData(MediaKind.STOP_AUDIO); + data.setStopAudio(); + return serializeOutStreamingData(data); + } catch (IOException e) { + throw LOGGER.logExceptionAsError(new RuntimeException("Failed to serialize OutStreamingData", e)); + } } /** @@ -133,7 +140,7 @@ private JsonWriter toJson(JsonWriter jsonWriter) throws IOException { if (this.audioData != null) { jsonWriter.writeFieldName("audioData"); jsonWriter.writeStartObject(); - jsonWriter.writeRawField("data", Base64.getEncoder().encodeToString(this.audioData.getData())); + jsonWriter.writeStringField("data", Base64.getEncoder().encodeToString(this.audioData.getData().toBytes())); jsonWriter.writeNullField("timestamp"); jsonWriter.writeNullField("participant"); jsonWriter.writeBooleanField("isSilent", this.audioData.isSilent()); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java index f53db7ff5f63..51bf6ca25e3f 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/PlayOptions.java @@ -39,11 +39,6 @@ public final class PlayOptions { */ private String operationCallbackUrl; - /* - * If set, hold audio will be interrupted, then this request will be played, and then the hold audio will be resumed. - */ - private Boolean interruptHoldAudio; - /** * Constructor * @param playSources A List of {@link PlaySource} representing the sources to play. @@ -143,24 +138,4 @@ public PlayOptions setOperationCallbackUrl(String operationCallbackUrl) { this.operationCallbackUrl = operationCallbackUrl; return this; } - - /** - * Get the interruptHoldAudio property. - * - * @return the interruptHoldAudio value. - */ - public Boolean isInterruptHoldAudio() { - return this.interruptHoldAudio; - } - - /** - * Set the interruptHoldAudio property - * - * @param interruptHoldAudio the interruptHoldAudio value to set. - * @return the PlayOptions object itself. - */ - public PlayOptions setInterruptHoldAudio(Boolean interruptHoldAudio) { - this.interruptHoldAudio = interruptHoldAudio; - return this; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingResult.java deleted file mode 100644 index 5e93faeaf4ce..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingResult.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import java.time.OffsetDateTime; -import java.util.List; - -import com.azure.communication.callautomation.implementation.accesshelpers.RecordingResultResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.Error; -import com.azure.communication.callautomation.implementation.models.RecordingResultResponse; -import com.azure.core.annotation.Immutable; - -/** The response payload of get call recording result operation. */ -@Immutable -public final class RecordingResult { - static { - RecordingResultResponseConstructorProxy.setAccessor(RecordingResult::new); - } - /* - * The recording id of the started recording - */ - private final String recordingId; - - /* - * Container for chunks - */ - private final RecordingStorageInfo recordingStorageInfo; - - /* - * The errors property. - */ - private final List errors; - - /* - * The recordingStartTime property. - */ - private final OffsetDateTime recordingStartTime; - - /* - * The recordingDurationMs property. - */ - private final Long recordingDurationMs; - - /* - * The sessionEndReason property. - */ - private final CallSessionEndReasonInfo sessionEndReason; - - /* - * The recordingExpirationTime property. - */ - private final OffsetDateTime recordingExpirationTime; - - /** - * Creates an instance of RecordingResult class. - */ - public RecordingResult() { - this.recordingId = null; - this.errors = null; - this.recordingDurationMs = null; - this.recordingStartTime = null; - this.recordingExpirationTime = null; - this.sessionEndReason = null; - this.recordingStorageInfo = null; - } - - /** - * Get the recordingId property: The recordingId property. - * - * @return the recordingId value. - */ - public String getRecordingId() { - return this.recordingId; - } - - /** - * Get the recordingStorageInfo property: Container for chunks. - * - * @return the recordingStorageInfo value. - */ - public RecordingStorageInfo getRecordingStorageInfo() { - return this.recordingStorageInfo; - } - - /** - * Get the errors property: The errors property. - * - * @return the errors value. - */ - public List getErrors() { - return this.errors; - } - - /** - * Get the recordingStartTime property: The recordingStartTime property. - * - * @return the recordingStartTime value. - */ - public OffsetDateTime getRecordingStartTime() { - return this.recordingStartTime; - } - - /** - * Get the recordingDurationMs property: The recordingDurationMs property. - * - * @return the recordingDurationMs value. - */ - public Long getRecordingDurationMs() { - return this.recordingDurationMs; - } - - /** - * Get the sessionEndReason property: The sessionEndReason property. - * - * @return the sessionEndReason value. - */ - public CallSessionEndReasonInfo getSessionEndReason() { - return this.sessionEndReason; - } - - /** - * Get the recordingExpirationTime property: The recordingExpirationTime property. - * - * @return the recordingExpirationTime value. - */ - public OffsetDateTime getRecordingExpirationTime() { - return this.recordingExpirationTime; - } - - /** - * Package-private constructor of the class, used internally only. - * - * @param recordingResultResponse The response from the service - */ - RecordingResult(RecordingResultResponse recordingResultResponse) { - RecordingStorageInfo storageInfo = new RecordingStorageInfo(); - this.recordingId = recordingResultResponse.getRecordingId(); - this.errors = recordingResultResponse.getErrors(); - this.recordingDurationMs = recordingResultResponse.getRecordingDurationMs(); - this.recordingStartTime = recordingResultResponse.getRecordingStartTime(); - this.recordingExpirationTime = recordingResultResponse.getRecordingExpirationTime(); - this.recordingStorageInfo - = storageInfo.setRecordingChunks(recordingResultResponse.getRecordingStorageInfo().getRecordingChunks()); - this.sessionEndReason - = CallSessionEndReasonInfo.fromString(recordingResultResponse.getSessionEndReason().toString()); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingStorageInfo.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingStorageInfo.java deleted file mode 100644 index b85b63ae8805..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RecordingStorageInfo.java +++ /dev/null @@ -1,93 +0,0 @@ -// 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.models; - -import java.io.IOException; -import java.util.List; - -import com.azure.communication.callautomation.implementation.models.RecordingChunkStorageInfo; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** - * Container for chunks. - */ -@Fluent -public final class RecordingStorageInfo implements JsonSerializable { - /* - * Collection of {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo} - */ - private List recordingChunks; - - /** - * Creates an instance of RecordingStorageInfo class. - */ - public RecordingStorageInfo() { - } - - /** - * Get the recordingChunks property: Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo}. - * - * @return the recordingChunks value. - */ - public List getRecordingChunks() { - return this.recordingChunks; - } - - /** - * Set the recordingChunks property: Collection of - * {Microsoft.Skype.Platform.ExecutionAgent.Azure.Communication.Service.ServerCalling.Content.Contracts.ALPHA4_2024_09_01_preview.Models.RecordingChunkStorageInfo}. - * - * @param recordingChunks the recordingChunks value to set. - * @return the RecordingStorageInfo object itself. - */ - public RecordingStorageInfo setRecordingChunks(List recordingChunks) { - this.recordingChunks = recordingChunks; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("recordingChunks", this.recordingChunks, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RecordingStorageInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RecordingStorageInfo if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RecordingStorageInfo. - */ - public static RecordingStorageInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RecordingStorageInfo deserializedRecordingStorageInfo = new RecordingStorageInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("recordingChunks".equals(fieldName)) { - List recordingChunks - = reader.readArray(reader1 -> RecordingChunkStorageInfo.fromJson(reader1)); - deserializedRecordingStorageInfo.recordingChunks = recordingChunks; - } else { - reader.skipChildren(); - } - } - - return deserializedRecordingStorageInfo; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantEventResult.java deleted file mode 100644 index f81123ebf748..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantEventResult.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.RemoveParticipantFailed; -import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Immutable; - -/** - * The result of a remove participant event. - */ -@Immutable -public final class RemoveParticipantEventResult { - private final boolean isSuccess; - private final RemoveParticipantSucceeded successResult; - private final RemoveParticipantFailed failureResult; - private final CommunicationIdentifier participant; - - /** - * Initializes a new instance of RemoveParticipantEventResult. - * - * @param isSuccess the success status of the remove participant operation. - * @param successResult the remove participant succeeded event. - * @param failureResult the remove participant failed event. - * @param participant the participant. - */ - RemoveParticipantEventResult(boolean isSuccess, RemoveParticipantSucceeded successResult, - RemoveParticipantFailed failureResult, CommunicationIdentifier participant) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - this.participant = participant; - } - - /** - * Gets the success status of the remove participant operation. - * - * @return the success status of the remove participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the remove participant succeeded event. - * - * @return the remove participant succeeded event. - */ - public RemoveParticipantSucceeded getSuccessResult() { - return successResult; - } - - /** - * Gets the remove participant failed event. - * - * @return the remove participant failed event. - */ - public RemoveParticipantFailed getFailureResult() { - return failureResult; - } - - /** - * Gets the participant. - * - * @return the participant. - */ - public CommunicationIdentifier getParticipant() { - return participant; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java index d16ffac6c503..c8c9f4c841de 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/RemoveParticipantResult.java @@ -5,18 +5,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy; import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.RemoveParticipantFailed; -import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The RemoveParticipantResult model. */ @Immutable -public final class RemoveParticipantResult extends ResultWithEventHandling { +public final class RemoveParticipantResult { /* * The operation context provided by client. */ @@ -58,41 +52,4 @@ public RemoveParticipantResult() { public String getOperationContext() { return this.operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == RemoveParticipantSucceeded.class - || event.getClass() == RemoveParticipantFailed.class)) - : eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == RemoveParticipantSucceeded.class - || event.getClass() == RemoveParticipantFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected RemoveParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - RemoveParticipantEventResult result = null; - - if (event.getClass() == RemoveParticipantSucceeded.class) { - result = new RemoveParticipantEventResult(true, (RemoveParticipantSucceeded) event, null, - ((RemoveParticipantSucceeded) event).getParticipant()); - } else if (event.getClass() == RemoveParticipantFailed.class) { - result = new RemoveParticipantEventResult(false, null, (RemoveParticipantFailed) event, - ((RemoveParticipantFailed) event).getParticipant()); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java deleted file mode 100644 index ec06e824c386..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/ResultWithEventHandling.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.CallAutomationEventProcessor; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import reactor.core.publisher.Mono; - -import java.time.Duration; - -/** - * Injects the event handling into the result - * - * @param the type of the event result - */ -public abstract class ResultWithEventHandling { - /** - * The event processor that handles events. - */ - protected CallAutomationEventProcessor eventProcessor; - /** - * The call's connection id. - */ - protected String callConnectionId; - /** - * Operation context from the api request. - */ - protected String operationContextFromRequest; - - /** - * Creates a new instance of {@link ResultWithEventHandling}. - */ - public ResultWithEventHandling() { - } - - /** - * Sets the event processor - * - * @param eventProcessor the event processor - * @param callConnectionId the call connection id - * @param operationContext the operation context - */ - public void setEventProcessor(CallAutomationEventProcessor eventProcessor, String callConnectionId, - String operationContext) { - this.eventProcessor = eventProcessor; - this.callConnectionId = callConnectionId; - this.operationContextFromRequest = operationContext; - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public TEventResult waitForEventProcessor() { - return waitForEventProcessorAsync().block(); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public TEventResult waitForEventProcessor(Duration timeout) { - return waitForEventProcessorAsync(timeout).block(); - } - - /** - * Waits for the event processor to process the event - * - * @return the result of the event processing - */ - public Mono waitForEventProcessorAsync() { - return waitForEventProcessorAsync(null); - } - - /** - * Waits for the event processor to process the event - * - * @param timeout the timeout - * @return the result of the event processing - */ - public abstract Mono waitForEventProcessorAsync(Duration timeout); - - /** - * Sets the returned event - * - * @param event the event to set - * @return the result of the event processing - */ - protected abstract TEventResult getReturnedEvent(CallAutomationEventBase event); -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java index 52c7ea7d8266..900865b471bd 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/SpeechResult.java @@ -3,16 +3,14 @@ package com.azure.communication.callautomation.models; -import com.azure.core.annotation.Fluent; +import java.io.IOException; + import com.azure.core.annotation.Immutable; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** The continuous speech recognition result. */ -@Fluent @Immutable public final class SpeechResult extends RecognizeResult { diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java deleted file mode 100644 index 966d8eec8964..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartDialogOptions.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import java.util.Map; -import java.util.UUID; - -/** - * The options for starting a dialog. - */ -public class StartDialogOptions { - - /* - * Bot identifier. - */ - private String botId; - - /* - * The dialog ID. - */ - private final String dialogId; - - /* - * Determines the type of the dialog. - */ - private final DialogInputType dialogInputType; - - /* - * Dialog context. - */ - private final Map dialogContext; - - /* - * The value to identify context of the operation. - */ - private String operationContext; - - /** - * Creates a new instance of the DialogOptions. - * - * @param dialogInputType type of dialog - * @param dialogContext context of the dialog - */ - public StartDialogOptions(DialogInputType dialogInputType, Map dialogContext) { - this.dialogInputType = dialogInputType; - this.dialogContext = dialogContext; - this.dialogId = UUID.randomUUID().toString(); - } - - /** - * Creates a new instance of the DialogOptions. - * - * @param dialogId id of the dialog - * @param dialogInputType type of dialog - * @param dialogContext context of the dialog - */ - public StartDialogOptions(String dialogId, DialogInputType dialogInputType, Map dialogContext) { - this.dialogId = dialogId; - this.dialogInputType = dialogInputType; - this.dialogContext = dialogContext; - } - - /** - * Get the botAppId property: Bot identifier. - * - * @return the botAppId value. - */ - public String getBotId() { - return botId; - } - - /** - * Set the botAppId property: Bot identifier. - * - * @param botId context of the operation - */ - public void setBotId(String botId) { - this.botId = botId; - } - - /** - * Get the dialogId property: The dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return dialogId; - } - - /** - * Get the dialogOptions property: Defines options for dialog. - * - * @return the dialogOptions value. - */ - public DialogInputType getDialogInputType() { - return dialogInputType; - } - - /** - * Get the dialogContext property: Dialog context. - * - * @return the dialogContext value. - */ - public Map getDialogContext() { - return dialogContext; - } - - /** - * Get the operationContext property: The value to identify context of the operation. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Set the operationContext property: The value to identify context of the operation. - * - * @param operationContext context of the operation - */ - public void setOperationContext(String operationContext) { - this.operationContext = operationContext; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java deleted file mode 100644 index 121a0ab4b833..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; - -/** - * Options for the Start Hold Music operation. - */ -public class StartHoldMusicOptions { - - /** - * Participant to put on hold. - */ - private final CommunicationIdentifier targetParticipant; - - /** - * Audio to play while on hold. - */ - private final PlaySource playSourceInfo; - - /** - * Operation context. - */ - private String operationContext; - - /** - * Create a new StartHoldMusicOptions object. - * @param targetParticipant Participant to be put on hold. - * @param playSourceInfo Audio to be played while on hold. - */ - public StartHoldMusicOptions(CommunicationIdentifier targetParticipant, PlaySource playSourceInfo) { - this.targetParticipant = targetParticipant; - this.playSourceInfo = playSourceInfo; - } - - /** - * Get Participant to be put on hold. - * @return participant. - */ - public CommunicationIdentifier getTargetParticipant() { - return targetParticipant; - } - - /** - * Get PlaySourceInfo - * @return the playSourceInfo. - */ - public PlaySource getPlaySourceInfo() { - return playSourceInfo; - } - - /** - * Get the operation context. - * @return operation context. - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Sets the operation context. - * @param operationContext Operation Context - * @return The StartHoldMusicOptions object. - */ - public StartHoldMusicOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java index ee0159146a71..cf3a60c10ab4 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartRecordingOptions.java @@ -18,8 +18,6 @@ public final class StartRecordingOptions { */ private final CallLocator callLocator; - private final String callConnectionId; - private String recordingStateCallbackUrl; private RecordingChannel recordingChannel; @@ -43,17 +41,6 @@ public final class StartRecordingOptions { */ public StartRecordingOptions(CallLocator callLocator) { this.callLocator = callLocator; - this.callConnectionId = null; - } - - /** - * Constructor - * - * @param callConnectionId the ID of the call connection. - */ - public StartRecordingOptions(String callConnectionId) { - this.callConnectionId = callConnectionId; - this.callLocator = null; } /** @@ -65,15 +52,6 @@ public CallLocator getCallLocator() { return this.callLocator; } - /** - * Get callConnectionId for the call - * - * @return callConnectionId for the call - */ - public String getCallConnectionId() { - return callConnectionId; - } - /** * Uri to send state change callbacks. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java index 0f4ad5147b92..04327c0157bf 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingData.java @@ -7,10 +7,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.AudioDataContructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.AudioMetadataContructorProxy; +import com.azure.communication.callautomation.implementation.accesshelpers.DtmfDataContructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.TranscriptionDataContructorProxy; import com.azure.communication.callautomation.implementation.accesshelpers.TranscriptionMetadataContructorProxy; import com.azure.communication.callautomation.implementation.converters.AudioDataConverter; import com.azure.communication.callautomation.implementation.converters.AudioMetadataConverter; +import com.azure.communication.callautomation.implementation.converters.DtmfDataConverter; import com.azure.communication.callautomation.implementation.converters.TranscriptionDataConverter; import com.azure.communication.callautomation.implementation.converters.TranscriptionMetadataConverter; import com.azure.json.JsonProviders; @@ -20,12 +22,14 @@ /** The abstract class used as parent of Streaming data such as Audio, Transcription, or Captions. */ public abstract class StreamingData { - private StreamingDataKind streamingDataKind; + private final StreamingDataKind streamingDataKind; /** * Creates an instance of {@link StreamingData}. + * @param streamingDataKind The kind of streaming data. */ - StreamingData() { + public StreamingData(StreamingDataKind streamingDataKind) { + this.streamingDataKind = streamingDataKind; } /** @@ -37,20 +41,11 @@ public StreamingDataKind getStreamingDataKind() { return streamingDataKind; } - /** - * Set the streaming data kind. - * - * @param streamingDataKind the kind of streaming data. - */ - protected void setStreamingDataKind(StreamingDataKind streamingDataKind) { - this.streamingDataKind = streamingDataKind; - } - /** * Parses a base64 encoded string into a StreamingData object, * which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. - * @return StreamingData + * @return StreamingData * @throws RuntimeException Throws a RuntimeException if the provided base64 string does not correspond to a supported data type for the specified Kind. */ public static StreamingData parse(String data) { @@ -61,7 +56,7 @@ public static StreamingData parse(String data) { * Parses a base64 encoded string into a StreamingData object, * which can be one of the following subtypes: AudioData, AudioMetadata, TranscriptionData, or TranscriptionMetadata. * @param Subtypes of StreamingData ex. AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata - * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. + * @param data The base64 string represents streaming data that will be converted into the appropriate subtype of StreamingData. * @param type type of the streamindata ex. AudioData, AudioMetadata, TranscriptionData, TranscriptionMetadata * @return Subtypes of StreamingData * @throws RuntimeException Throws a NotSupportedException if the provided base64 string does not correspond @@ -73,8 +68,8 @@ public static T parse(String data, Class type) { } /** - * - * @param data the base64 string + * + * @param data the base64 string * @return the StreamingData */ private static StreamingData parseStreamingData(String data) { @@ -87,25 +82,25 @@ private static StreamingData parseStreamingData(String data) { case "audioData": AudioData audioData = AudioDataContructorProxy.create(AudioDataConverter.fromJson(jsonReader)); - audioData.setStreamingDataKind(StreamingDataKind.AUDIO_DATA); return audioData; case "audioMetadata": AudioMetadata audioMetadata = AudioMetadataContructorProxy.create(AudioMetadataConverter.fromJson(jsonReader)); - audioMetadata.setStreamingDataKind(StreamingDataKind.AUDIO_METADATA); return audioMetadata; + case "dtmfData": + DtmfData dtmfData = DtmfDataContructorProxy.create(DtmfDataConverter.fromJson(jsonReader)); + return dtmfData; + case "transcriptionData": TranscriptionData transcriptionData = TranscriptionDataContructorProxy .create(TranscriptionDataConverter.fromJson(jsonReader)); - transcriptionData.setStreamingDataKind(StreamingDataKind.TRANSCRIPTION_DATA); return transcriptionData; case "transcriptionMetadata": TranscriptionMetadata transcriptionMetadata = TranscriptionMetadataContructorProxy .create(TranscriptionMetadataConverter.fromJson(jsonReader)); - transcriptionMetadata.setStreamingDataKind(StreamingDataKind.TRANSCRIPTION_METADATA); return transcriptionMetadata; default: diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingDataKind.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingDataKind.java index e99f64371f53..6aa0da8d9cac 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingDataKind.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StreamingDataKind.java @@ -3,9 +3,10 @@ package com.azure.communication.callautomation.models; -import com.azure.core.util.ExpandableStringEnum; import java.util.Collection; +import com.azure.core.util.ExpandableStringEnum; + /** * Specifies the streaming data kind */ @@ -20,6 +21,11 @@ public final class StreamingDataKind extends ExpandableStringEnum { + /** + * Static value websocket for StreamingTransportType. + */ + public static final StreamingTransport WEBSOCKET = fromString("websocket"); + + /** + * Creates a new instance of StreamingTransportType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public StreamingTransport() { + } + + /** + * Creates or finds a StreamingTransportType from its string representation. + * + * @param name a name to look for. + * @return the corresponding StreamingTransportType. + */ + public static StreamingTransport fromString(String name) { + return fromString(name, StreamingTransport.class); + } + + /** + * Gets known StreamingTransportType values. + * + * @return known StreamingTransportType values. + */ + public static Collection values() { + return values(StreamingTransport.class); + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionData.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionData.java index f0ede0dfb3f5..97153b4c4a0c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionData.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionData.java @@ -6,14 +6,16 @@ import com.azure.communication.callautomation.implementation.accesshelpers.TranscriptionDataContructorProxy; import com.azure.communication.callautomation.implementation.converters.TranscriptionDataConverter; import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; import com.azure.core.util.logging.ClientLogger; import java.util.List; import java.time.Duration; /** - * The TranscriptionData model. + * The data which contains the transcription data stream information such as DisplayText.. */ +@Immutable public final class TranscriptionData extends StreamingData { private static final ClientLogger LOGGER = new ClientLogger(TranscriptionData.class); @@ -76,7 +78,8 @@ public TranscriptionData create(TranscriptionDataConverter internalData) { * * @param internalData transcription internal data */ - TranscriptionData(TranscriptionDataConverter internalData) { + protected TranscriptionData(TranscriptionDataConverter internalData) { + super(StreamingDataKind.TRANSCRIPTION_DATA); this.text = internalData.getText(); this.format = convertToTextFormatEnum(internalData.getFormat()); this.confidence = internalData.getConfidence(); @@ -92,20 +95,6 @@ public TranscriptionData create(TranscriptionDataConverter internalData) { this.resultState = convertToResultStatusEnum(internalData.getResultStatus()); } - /** - * Create instance of transcription data - */ - public TranscriptionData() { - this.text = null; - this.format = null; - this.confidence = null; - this.offset = null; - this.duration = null; - this.words = null; - this.participant = null; - this.resultState = null; - } - private TranscriptionResultState convertToResultStatusEnum(String resultStatus) { if ("Intermediate".equalsIgnoreCase(resultStatus)) { return TranscriptionResultState.INTERMEDIATE; @@ -126,6 +115,7 @@ private TextFormat convertToTextFormatEnum(String format) { } /** + * The display form of the recognized word * Get the text property. * * @return the text value. @@ -135,7 +125,8 @@ public String getText() { } /** - * Get the format property. + * The format of tex + * Get the format property. * * @return the format value. */ @@ -144,6 +135,7 @@ public TextFormat getFormat() { } /** + * Confidence of recognition of the whole phrase, from 0.0 (no confidence) to 1.0 (full confidence) * Get the confidence property. * * @return the confidence value. @@ -153,6 +145,7 @@ public double getConfidence() { } /** + * The starting position of this payload * Get the offset property. * * @return the offset value. @@ -162,6 +155,8 @@ public Long getOffset() { } /** + * Duration of this payload in the media + * Duration in ticks. 1 tick = 100 nanoseconds. * Get the duration property. * * @return the duration value. @@ -171,6 +166,7 @@ public Duration getDuration() { } /** + * The result for each word of the phrase * Get the words property. * * @return the words value. @@ -189,6 +185,7 @@ public CommunicationIdentifier getParticipant() { } /** + * Status of the result of transcription * Get the resultState property. * * @return the resultState value. diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionMetadata.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionMetadata.java index 266727614930..8bfd7d65904e 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionMetadata.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionMetadata.java @@ -7,7 +7,7 @@ import com.azure.communication.callautomation.implementation.converters.TranscriptionMetadataConverter; /** - * Metadata for Transcription Streaming. + * The metadata of transcription which contains the information such as subscriptionId, locale ... */ public final class TranscriptionMetadata extends StreamingData { @@ -31,6 +31,11 @@ public final class TranscriptionMetadata extends StreamingData { */ private final String correlationId; + /* + * The custom speech recognition model endpoint id + */ + private final String speechRecognitionModelEndpointId; + static { TranscriptionMetadataContructorProxy .setAccessor(new TranscriptionMetadataContructorProxy.TranscriptionMetadataContructorProxyAccessor() { @@ -46,23 +51,16 @@ public TranscriptionMetadata create(TranscriptionMetadataConverter internalData) * @param internalData Transcription meta data internal. */ TranscriptionMetadata(TranscriptionMetadataConverter internalData) { + super(StreamingDataKind.TRANSCRIPTION_METADATA); this.transcriptionSubscriptionId = internalData.getTranscriptionSubscriptionId(); this.locale = internalData.getLocale(); this.callConnectionId = internalData.getCallConnectionId(); this.correlationId = internalData.getCorrelationId(); + this.speechRecognitionModelEndpointId = internalData.getSpeechRecognitionModelEndpointId(); } /** - * Creates an instance of TranscriptionMetadata class. - */ - public TranscriptionMetadata() { - this.transcriptionSubscriptionId = null; - this.locale = null; - this.callConnectionId = null; - this.correlationId = null; - } - - /** + * The custom speech recognition model endpoint id * Get the transcriptionSubscriptionId property. * * @return the transcriptionSubscriptionId value. @@ -72,6 +70,7 @@ public String getTranscriptionSubscriptionId() { } /** + * The target locale in which the translated text needs to be * Get the locale property. * * @return the locale value. @@ -97,4 +96,14 @@ public String getCallConnectionId() { public String getCorrelationId() { return correlationId; } + + /** + * The custom speech recognition model endpoint id + * Get the speechRecognitionModelEndpointId property. + * + * @return the speechRecognitionModelEndpointId value. + */ + public String getSpeechRecognitionModelEndpointId() { + return speechRecognitionModelEndpointId; + } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java index 3a36ba2faae8..aecca7019a47 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionOptions.java @@ -8,15 +8,10 @@ /** The TranscriptionOptions model. */ @Fluent public final class TranscriptionOptions { - /* - * Transport URL for live transcription - */ - private final String transportUrl; - /* * The type of transport to be used for live transcription, eg. Websocket */ - private final TranscriptionTransport transportType; + private final StreamingTransport transportType; /* * Defines the locale for the data e.g en-CA, en-AU @@ -26,7 +21,7 @@ public final class TranscriptionOptions { /* * Determines if the transcription should be started immediately after call is answered or not. */ - private final boolean startTranscription; + private boolean startTranscription; /* * Endpoint where the custom model was deployed. @@ -38,19 +33,28 @@ public final class TranscriptionOptions { */ private Boolean enableIntermediateResults; + /* + * Transport URL for live transcription + */ + private String transportUrl; + /** - * Creates a new instance of MediaStreamingConfiguration - * @param transportUrl - The Transport URL - * @param transportType - Transport type + * Creates a new instance of TranscriptionOptions * @param locale - Locale - * @param startTranscription - Start Transcription + * @param transportType - The type of transport to be used for live transcription */ - public TranscriptionOptions(String transportUrl, TranscriptionTransport transportType, String locale, - boolean startTranscription) { - this.transportUrl = transportUrl; + public TranscriptionOptions(String locale, StreamingTransport transportType) { this.transportType = transportType; this.locale = locale; - this.startTranscription = startTranscription; + this.startTranscription = false; + } + + /** + * Creates a new instance of TranscriptionOptions with default transportType as WEBSOCKET. + * @param locale - Locale + */ + public TranscriptionOptions(String locale) { + this(locale, StreamingTransport.WEBSOCKET); } /** @@ -62,12 +66,23 @@ public String getTransportUrl() { return this.transportUrl; } + /** + * Set the transportUrl property: Transport URL for live transcription. + * + * @param transportUrl the transportUrl value to set. + * @return the TranscriptionOptions object itself. + */ + public TranscriptionOptions setTransportUrl(String transportUrl) { + this.transportUrl = transportUrl; + return this; + } + /** * Get the transportType property: The type of transport to be used for live transcription, eg. Websocket. * * @return the transportType value. */ - public TranscriptionTransport getTransportType() { + public StreamingTransport getTransportType() { return this.transportType; } @@ -81,17 +96,30 @@ public String getLocale() { } /** - * Get the startTranscription property: Which determines if the transcription should be started immediately after call is answered or not. + * Get the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. * * @return the startTranscription value. */ - public boolean getStartTranscription() { + public Boolean isStartTranscription() { return this.startTranscription; } + /** + * Set the startTranscription property: Indicates whether the transcription should start immediately after the call + * is answered. + * + * @param startTranscription the startTranscription value to set. + * @return the TranscriptionOptions object itself. + */ + public TranscriptionOptions setStartTranscription(Boolean startTranscription) { + this.startTranscription = startTranscription; + return this; + } + /** * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * + * * @return the speechRecognitionModelEndpointId value. */ public String getSpeechRecognitionModelEndpointId() { @@ -100,7 +128,7 @@ public String getSpeechRecognitionModelEndpointId() { /** * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. - * + * * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. * @return the TranscriptionOptions object itself. */ @@ -111,7 +139,7 @@ public TranscriptionOptions setSpeechRecognitionModelEndpointId(String speechRec /** * Get the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * + * * @return the enableIntermediateResults value. */ public Boolean isIntermediateResultsEnabled() { @@ -120,7 +148,7 @@ public Boolean isIntermediateResultsEnabled() { /** * Set the enableIntermediateResults property: Enables intermediate results for the transcribed speech. - * + * * @param enableIntermediateResults the enableIntermediateResults value to set. * @return the TranscriptionOptions object itself. */ diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionSubscription.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionSubscription.java index 8ef85b874e4c..bc04ca33efe9 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionSubscription.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionSubscription.java @@ -4,7 +4,7 @@ package com.azure.communication.callautomation.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.communication.callautomation.implementation.models.TranscriptionSubscriptionInternal; import com.azure.communication.callautomation.implementation.accesshelpers.TranscriptionSubscriptionConstructorProxy; import java.util.List; @@ -19,7 +19,7 @@ /** * Transcription Subscription Object. */ -@Fluent +@Immutable public final class TranscriptionSubscription implements JsonSerializable { /* * Gets or Sets subscription Id. @@ -31,10 +31,15 @@ public final class TranscriptionSubscription implements JsonSerializable subscribedResultTypes; + private List subscribedResultStates; static { TranscriptionSubscriptionConstructorProxy @@ -49,10 +54,11 @@ public TranscriptionSubscription create(TranscriptionSubscriptionInternal intern /** * Creates an instance of TranscriptionSubscriptionInternal class. */ - public TranscriptionSubscription() { + TranscriptionSubscription() { id = null; state = null; - subscribedResultTypes = null; + subscribedResultStates = null; + this.locale = null; } /** @@ -65,12 +71,15 @@ public TranscriptionSubscription() { this.state = transcriptionSubscriptionInternal.getState() != null ? TranscriptionSubscriptionState.fromString(transcriptionSubscriptionInternal.getState().toString()) : null; - this.subscribedResultTypes = transcriptionSubscriptionInternal.getSubscribedResultTypes() != null + this.subscribedResultStates = transcriptionSubscriptionInternal.getSubscribedResultTypes() != null ? transcriptionSubscriptionInternal.getSubscribedResultTypes() .stream() .map(resultType -> TranscriptionResultState.fromString(resultType.toString())) .collect(Collectors.toList()) : null; + this.locale = transcriptionSubscriptionInternal.getLocale() != null + ? transcriptionSubscriptionInternal.getLocale().toString() + : null; } /** @@ -92,12 +101,21 @@ public TranscriptionSubscriptionState getState() { } /** - * Get the subscribedResultTypes property: Gets or Sets the subscribed transcription result types. + * Get the state property: Gets or Sets transcription subscription state. + * + * @return the state value. + */ + public String getLocale() { + return this.locale; + } + + /** + * Get the subscribedResultStates property: Gets or Sets the subscribed transcription result types. * - * @return the subscribedResultTypes value. + * @return the subscribedResultStates value. */ - public List getSubscribedResultTypes() { - return this.subscribedResultTypes; + public List getSubscribedResultStates() { + return this.subscribedResultStates; } @Override @@ -105,8 +123,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("id", this.id); jsonWriter.writeStringField("state", this.state == null ? null : this.state.toString()); - jsonWriter.writeArrayField("subscribedResultTypes", this.subscribedResultTypes, + jsonWriter.writeArrayField("subscribedResultStates", this.subscribedResultStates, (writer, element) -> writer.writeString(element == null ? null : element.toString())); + jsonWriter.writeStringField("locale", this.locale); return jsonWriter.writeEndObject(); } @@ -130,10 +149,12 @@ public static TranscriptionSubscription fromJson(JsonReader jsonReader) throws I } else if ("state".equals(fieldName)) { deserializedTranscriptionSubscription.state = TranscriptionSubscriptionState.fromString(reader.getString()); - } else if ("subscribedResultTypes".equals(fieldName)) { + } else if ("subscribedResultStates".equals(fieldName)) { List subscribedResultTypes = reader.readArray(reader1 -> TranscriptionResultState.fromString(reader1.getString())); - deserializedTranscriptionSubscription.subscribedResultTypes = subscribedResultTypes; + deserializedTranscriptionSubscription.subscribedResultStates = subscribedResultTypes; + } else if ("locale".equals(fieldName)) { + deserializedTranscriptionSubscription.locale = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionTransport.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionTransport.java deleted file mode 100644 index 65f40ca535d2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TranscriptionTransport.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of transport to be used for live transcription, eg. Websocket. - */ -public final class TranscriptionTransport extends ExpandableStringEnum { - /** - * Static value websocket for TranscriptionTransportType. - */ - public static final TranscriptionTransport WEBSOCKET = fromString("websocket"); - - /** - * Creates a new instance of TranscriptionTransportType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public TranscriptionTransport() { - } - - /** - * Creates or finds a TranscriptionTransportType from its string representation. - * - * @param name a name to look for. - * @return the corresponding TranscriptionTransportType. - */ - public static TranscriptionTransport fromString(String name) { - return fromString(name, TranscriptionTransport.class); - } - - /** - * Gets known TranscriptionTransportType values. - * - * @return known TranscriptionTransportType values. - */ - public static Collection values() { - return values(TranscriptionTransport.class); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java index cc5d09704374..379a73e19f70 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallResult.java @@ -5,18 +5,12 @@ import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy; import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CallTransferFailed; import com.azure.core.annotation.Immutable; -import reactor.core.publisher.Mono; - -import java.time.Duration; import java.util.Objects; /** The TransferCallResult model. */ @Immutable -public final class TransferCallResult extends ResultWithEventHandling { +public final class TransferCallResult { /* * The operation context provided by client. */ @@ -59,37 +53,4 @@ public TransferCallResult() { public String getOperationContext() { return this.operationContext; } - - @Override - public Mono waitForEventProcessorAsync(Duration timeout) { - if (eventProcessor == null) { - return Mono.empty(); - } - - return (timeout == null - ? eventProcessor - .waitForEventProcessorAsync(event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallTransferAccepted.class || event.getClass() == CallTransferFailed.class)) - : eventProcessor.waitForEventProcessorAsync( - event -> Objects.equals(event.getCallConnectionId(), callConnectionId) - && (Objects.equals(event.getOperationContext(), operationContextFromRequest) - || operationContextFromRequest == null) - && (event.getClass() == CallTransferAccepted.class || event.getClass() == CallTransferFailed.class), - timeout)).flatMap(event -> Mono.just(getReturnedEvent(event))); - } - - @Override - protected TransferCallToParticipantEventResult getReturnedEvent(CallAutomationEventBase event) { - TransferCallToParticipantEventResult result = null; - - if (event.getClass() == CallTransferAccepted.class) { - result = new TransferCallToParticipantEventResult(true, (CallTransferAccepted) event, null); - } else if (event.getClass() == CallTransferFailed.class) { - result = new TransferCallToParticipantEventResult(false, null, (CallTransferFailed) event); - } - - return result; - } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java deleted file mode 100644 index 03ccefe0ac48..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantEventResult.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CallTransferFailed; -import com.azure.core.annotation.Immutable; - -/** - * The result of a transfer call to participant event. - */ -@Immutable -public final class TransferCallToParticipantEventResult { - private final boolean isSuccess; - private final CallTransferAccepted successResult; - private final CallTransferFailed failureResult; - - /** - * Initializes a new instance of TransferCallToParticipantEventResult. - * - * @param isSuccess the success status of the transfer call to participant operation. - * @param successResult the transfer call to participant succeeded event. - * @param failureResult the transfer call to participant failed event. - */ - TransferCallToParticipantEventResult(boolean isSuccess, CallTransferAccepted successResult, - CallTransferFailed failureResult) { - this.isSuccess = isSuccess; - this.successResult = successResult; - this.failureResult = failureResult; - } - - /** - * Gets the success status of the transfer call to participant operation. - * - * @return the success status of the transfer call to participant operation. - */ - public boolean isSuccess() { - return isSuccess; - } - - /** - * Gets the transfer call to participant succeeded event. - * - * @return the transfer call to participant succeeded event. - */ - public CallTransferAccepted getSuccessResult() { - return successResult; - } - - /** - * Gets the transfer call to participant failed event. - * - * @return the transfer call to participant failed event. - */ - public CallTransferFailed getFailureResult() { - return failureResult; - } - -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java index c1e4903d5487..26237f3482e6 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java @@ -7,7 +7,6 @@ import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; import com.azure.communication.common.MicrosoftTeamsUserIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.annotation.Fluent; @@ -80,16 +79,6 @@ public TransferCallToParticipantOptions(MicrosoftTeamsUserIdentifier targetParti this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); } - /** - * Constructor - * - * @param targetParticipant {@link MicrosoftTeamsAppIdentifier} contains information for TransferTarget(to whom the call is transferred). - */ - public TransferCallToParticipantOptions(MicrosoftTeamsAppIdentifier targetParticipant) { - this.targetParticipant = targetParticipant; - this.customCallingContext = new CustomCallingContext(null, new HashMap<>()); - } - /** * Get the operationContext. * diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnholdOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnholdOptions.java index 02aafab059b2..3b3debc065bf 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnholdOptions.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnholdOptions.java @@ -10,8 +10,9 @@ */ public final class UnholdOptions { - /** - * Participant to put on unhold. + /* + * Participants to be hold from the call. + * Only ACS Users are supported. */ private final CommunicationIdentifier targetParticipant; @@ -20,6 +21,12 @@ public final class UnholdOptions { */ private String operationContext; + /* + * Set a callback URL that overrides the default callback URL set by CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URL set by CreateCall/AnswerCall will be used. + */ + private String operationCallbackUrl; + /** * Create a new UnholdOptions object. * @param targetParticipant Participant to be put on unhold. @@ -53,4 +60,28 @@ public UnholdOptions setOperationContext(String operationContext) { this.operationContext = operationContext; return this; } + + /** + * Get the operationCallbackUrl property: Set a callback URI that overrides the default callback URL set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URL set by CreateCall/AnswerCall will be used. + * + * @return the operationCallbackUrl value. + */ + public String getOperationCallbackUrl() { + return this.operationCallbackUrl; + } + + /** + * Set the operationCallbackUrl property: Set a callback URI that overrides the default callback URI set by + * CreateCall/AnswerCall for this operation. + * This setup is per-action. If this is not set, the default callback URI set by CreateCall/AnswerCall will be used. + * + * @param operationCallbackUrl the operationCallbackUrl value to set. + * @return the UnholdRequest object itself. + */ + public UnholdOptions setOperationCallbackUrl(String operationCallbackUrl) { + this.operationCallbackUrl = operationCallbackUrl; + return this; + } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java deleted file mode 100644 index 6c1341c81709..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantOptions.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.core.annotation.Fluent; - -/** - * The options for unmuting a participant. - */ -@Fluent -public final class UnmuteParticipantOptions { - /** - * The participants to unmute. - * Only ACS Users are currently supported. - */ - private final CommunicationIdentifier targetParticipant; - - /** - * The operational context - */ - private String operationContext; - - /** - * Constructor - * - * @param targetParticipant The participants to unmute. - */ - public UnmuteParticipantOptions(CommunicationIdentifier targetParticipant) { - this.targetParticipant = targetParticipant; - } - - /** - * Get the participant. - * - * @return the participant to unmute. - */ - public CommunicationIdentifier getTargetParticipant() { - return targetParticipant; - } - - /** - * Get the operationContext. - * - * @return the operationContext - */ - public String getOperationContext() { - return operationContext; - } - - /** - * Set the operationContext. - * - * @param operationContext the operationContext to set - * @return the UnmuteParticipantOptions object itself. - */ - public UnmuteParticipantOptions setOperationContext(String operationContext) { - this.operationContext = operationContext; - return this; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java deleted file mode 100644 index 9d63a71a78be..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UnmuteParticipantResult.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.communication.callautomation.implementation.accesshelpers.UnmuteParticipantsResponseConstructorProxy; -import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsResponseInternal; -import com.azure.core.annotation.Immutable; - -import java.util.Objects; - -/** The UnmuteParticipantsResult model. */ -@Immutable -public final class UnmuteParticipantResult { - /* - * The operation context provided by client. - */ - private final String operationContext; - - static { - UnmuteParticipantsResponseConstructorProxy.setAccessor(UnmuteParticipantResult::new); - } - - /** - * Public constructor. - * - */ - public UnmuteParticipantResult() { - this.operationContext = null; - } - - /** - * Package-private constructor of the class, used internally only. - * - * @param unmuteParticipantsResponseInternal The response from the service - */ - UnmuteParticipantResult(UnmuteParticipantsResponseInternal unmuteParticipantsResponseInternal) { - Objects.requireNonNull(unmuteParticipantsResponseInternal, - "unmuteParticipantsResponseInternal must not be null"); - - this.operationContext = unmuteParticipantsResponseInternal.getOperationContext(); - } - - /** - * Get the operationContext property: The operation context provided by client. - * - * @return the operationContext value. - */ - public String getOperationContext() { - return this.operationContext; - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UpdateTranscriptionOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UpdateTranscriptionOptions.java new file mode 100644 index 000000000000..06cafc4187d7 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UpdateTranscriptionOptions.java @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callautomation.models; + +import com.azure.core.annotation.Fluent; + +/** + * Options for the Update Transcription operation. + */ +@Fluent +public final class UpdateTranscriptionOptions { + + /** + * Defines Locale for the transcription e,g en-US. + */ + private String locale; + + /** + * The value to identify context of the operation. + */ + private String operationContext; + + /** + * Creates an instance of {@link UpdateTranscriptionOptions}. + */ + public UpdateTranscriptionOptions() { + } + + /** + * Endpoint where the custom model was deployed. + */ + private String speechRecognitionModelEndpointId; + + /** + * Get the locale. + * + * @return locale. + */ + public String getLocale() { + return locale; + } + + /** + * Sets the locale. + * + * @param locale the incoming locale + * @return The UpdateTranscriptionOptions object. + */ + public UpdateTranscriptionOptions setLocale(String locale) { + this.locale = locale; + return this; + } + + /** + * Get the operation context. + * + * @return operation context. + */ + public String getOperationContext() { + return operationContext; + } + + /** + * Get the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. + * + * @return the speechRecognitionModelEndpointId value. + */ + public String getSpeechRecognitionModelEndpointId() { + return this.speechRecognitionModelEndpointId; + } + + /** + * Sets the operation context. + * + * @param operationContext Operation Context + * @return The UpdateTranscriptionOptions object. + */ + public UpdateTranscriptionOptions setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * Set the speechRecognitionModelEndpointId property: Endpoint where the custom model was deployed. + * + * @param speechRecognitionModelEndpointId the speechRecognitionModelEndpointId value to set. + * @return the UpdateTranscriptionOptions object itself. + */ + public UpdateTranscriptionOptions setSpeechRecognitionModelEndpointId(String speechRecognitionModelEndpointId) { + this.speechRecognitionModelEndpointId = speechRecognitionModelEndpointId; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java deleted file mode 100644 index 976373ec521b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/UserConsent.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The UserConsent model. */ -@Fluent -public final class UserConsent implements JsonSerializable { - /* - * The recording property. - */ - private Integer recording; - - /** Creates an instance of UserConsent class. */ - public UserConsent() { - } - - /** - * Get the recording property: The recording property. - * - * @return the recording value. - */ - public Integer getRecording() { - return this.recording; - } - - /** - * Set the recording property: The recording property. - * - * @param recording the recording value to set. - * @return the UserConsent object itself. - */ - public UserConsent setRecording(Integer recording) { - this.recording = recording; - return this; - } - - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("recording", recording); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UserConsent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UserConsent if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the UserConsent. - */ - public static UserConsent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UserConsent consent = new UserConsent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("recording".equals(fieldName)) { - consent.recording = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - return consent; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java deleted file mode 100644 index c0f022699fd2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogCompleted.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogCompleted model. */ -@Immutable -public class DialogCompleted extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogCompleted class. */ - public DialogCompleted() { - } - - /** - * 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; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogCompleted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogCompleted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogCompleted. - */ - public static DialogCompleted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogCompleted event = new DialogCompleted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java deleted file mode 100644 index 9bcece409fa4..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogConsent.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.UserConsent; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogConsent model. */ -@Immutable -public final class DialogConsent extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * UserConsent data from the Conversation Conductor - */ - private UserConsent userConsent; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogConsent class. */ - public DialogConsent() { - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeJsonField("userConsent", userConsent); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogConsent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogConsent if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogConsent. - */ - public static DialogConsent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogConsent event = new DialogConsent(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("userConsent".equals(fieldName)) { - event.userConsent = UserConsent.fromJson(reader); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java deleted file mode 100644 index 301fc27f8859..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogFailed.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogFailed model. */ -public final class DialogFailed extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogCompleted class. */ - public DialogFailed() { - } - - /** - * 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; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogFailed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogFailed if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogFailed. - */ - public static DialogFailed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogFailed event = new DialogFailed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java deleted file mode 100644 index 0524fb9f7805..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogHangup.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogHangup model. */ -@Fluent -public final class DialogHangup extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Ivr Context - */ - private Object ivrContext; - - /** Creates an instance of DialogHangup class. */ - public DialogHangup() { - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogHangup from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogHangup if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogHangup. - */ - public static DialogHangup fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogHangup event = new DialogHangup(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java deleted file mode 100644 index 9baf46a20f2a..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogLanguageChange.java +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogLanguageChange model. */ -@Fluent -public final class DialogLanguageChange extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Selected Language - */ - private String selectedLanguage; - - /* - * Ivr Context - */ - private Object ivrContext; - - /** Creates an instance of DialogLanguageChange class. */ - public DialogLanguageChange() { - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeStringField("selectedLanguage", selectedLanguage); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogLanguageChange from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogLanguageChange if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogLanguageChange. - */ - public static DialogLanguageChange fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogLanguageChange event = new DialogLanguageChange(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("selectedLanguage".equals(fieldName)) { - event.selectedLanguage = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java deleted file mode 100644 index a477b0ddf1af..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogSensitivityUpdate.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogSensitivityUpdate model. */ -@Fluent -public final class DialogSensitivityUpdate extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * SensitiveMask - */ - private Boolean sensitiveMask; - - /** Creates an instance of DialogSensitivityUpdate class. */ - public DialogSensitivityUpdate() { - } - - /** - * 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; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * Get the sensitiveMask property: SensitiveMask. - * - * @return the sensitiveMask value. - */ - public Boolean isSensitiveMask() { - return this.sensitiveMask; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeBooleanField("sensitiveMask", sensitiveMask); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogSensitivityUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogSensitivityUpdate if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogSensitivityUpdate. - */ - public static DialogSensitivityUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogSensitivityUpdate event = new DialogSensitivityUpdate(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("sensitiveMask".equals(fieldName)) { - event.sensitiveMask = reader.getBoolean(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java deleted file mode 100644 index 3b25f91b461f..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogStarted.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogStarted model. */ -@Immutable -public class DialogStarted extends CallAutomationEventBase { - - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /** Creates an instance of DialogStarted class. */ - public DialogStarted() { - } - - /** - * 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; - } - - /** - * Get the dialogId property: Dialog ID. - * - * @return the dialogId value. - */ - public String getDialogId() { - return this.dialogId; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogStarted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogStarted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogStarted. - */ - public static DialogStarted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogStarted event = new DialogStarted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java deleted file mode 100644 index 69c6a7ddc56a..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/DialogTransfer.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -import java.io.IOException; - -/** The DialogTransfer model. */ -@Fluent -public final class DialogTransfer extends CallAutomationEventBase { - /* - * Contains the resulting SIP code/sub-code and message from NGC services. - */ - private ResultInformation resultInformation; - - /* - * Determines the type of the dialog. - */ - private DialogInputType dialogInputType; - - /* - * Dialog ID - */ - private String dialogId; - - /* - * Transfer type - */ - private String transferType; - - /* - * Transfer destination - */ - private String transferDestination; - - /* - * IVR context - */ - private Object ivrContext; - - /** Creates an instance of DialogTransfer class. */ - public DialogTransfer() { - } - - /** - * 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; - } - - /** - * 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; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("resultInformation", resultInformation); - jsonWriter.writeStringField("dialogInputType", dialogInputType != null ? dialogInputType.toString() : null); - jsonWriter.writeStringField("dialogId", dialogId); - jsonWriter.writeStringField("transferType", transferType); - jsonWriter.writeStringField("transferDestination", transferDestination); - jsonWriter.writeUntypedField("ivrContext", ivrContext); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DialogTransfer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DialogTransfer if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DialogTransfer. - */ - public static DialogTransfer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final DialogTransfer event = new DialogTransfer(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("resultInformation".equals(fieldName)) { - event.resultInformation = ResultInformation.fromJson(reader); - } else if ("dialogInputType".equals(fieldName)) { - event.dialogInputType = DialogInputType.fromString(reader.getString()); - } else if ("dialogId".equals(fieldName)) { - event.dialogId = reader.getString(); - } else if ("transferType".equals(fieldName)) { - event.transferType = reader.getString(); - } else if ("transferDestination".equals(fieldName)) { - event.transferDestination = reader.getString(); - } else if ("ivrContext".equals(fieldName)) { - event.ivrContext = reader.readUntyped(); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java deleted file mode 100644 index 014044a82f5b..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioCompleted.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioCompleted model. */ -@Immutable -public final class HoldAudioCompleted extends CallAutomationEventBase { - - private HoldAudioCompleted() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioCompleted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioCompleted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioCompleted. - */ - public static HoldAudioCompleted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioCompleted event = new HoldAudioCompleted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java deleted file mode 100644 index 23497dde03f4..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioPaused.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioPaused model. */ -@Immutable -public final class HoldAudioPaused extends CallAutomationEventBase { - - private HoldAudioPaused() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioPaused from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioPaused. - */ - public static HoldAudioPaused fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioPaused event = new HoldAudioPaused(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java deleted file mode 100644 index 86b80a6924e6..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioResumed.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioResumed model. */ -@Immutable -public final class HoldAudioResumed extends CallAutomationEventBase { - - private HoldAudioResumed() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioResumed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioResumed if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioResumed. - */ - public static HoldAudioResumed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioResumed event = new HoldAudioResumed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java deleted file mode 100644 index 0a4aaf3ea8d3..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/HoldAudioStarted.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The HoldAudioStarted model. */ -@Immutable -public final class HoldAudioStarted extends CallAutomationEventBase { - - private HoldAudioStarted() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HoldAudioStarted from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HoldAudioStarted if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HoldAudioStarted. - */ - public static HoldAudioStarted fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final HoldAudioStarted event = new HoldAudioStarted(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java deleted file mode 100644 index 8ee03d2beed9..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/IncomingCall.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.callautomation.models.CustomCallingContext; -import com.azure.communication.callautomation.implementation.models.CommunicationIdentifierModel; -import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The IncomingCall model. */ -@Immutable -public final class IncomingCall extends CallAutomationEventBase { - private CommunicationIdentifier to; - private CommunicationIdentifier from; - private String callerDisplayName; - private CustomCallingContext customContext; - private String incomingCallContext; - private CommunicationIdentifier onBehalfOfCallee; - - private IncomingCall() { - } - - private IncomingCall(CommunicationIdentifier to, CommunicationIdentifier from, String callerDisplayName, - CustomCallingContext customContext, String incomingCallContext, CommunicationIdentifier onBehalfOfCallee) { - this.to = to; - this.from = from; - this.callerDisplayName = callerDisplayName; - this.customContext = customContext; - this.incomingCallContext = incomingCallContext; - this.onBehalfOfCallee = onBehalfOfCallee; - } - - /** - * Get the to property: The communication identifier of the target user. - * - * @return the to value. - */ - public CommunicationIdentifier getTo() { - return this.to; - } - - /** - * Get the from property: The communication identifier of the user who initiated the call. - * - * @return the from value. - */ - public CommunicationIdentifier getFrom() { - return this.from; - } - - /** - * Get the callerDisplayName property: Display name of caller. - * - * @return the callerDisplayName value. - */ - public String getCallerDisplayName() { - return this.callerDisplayName; - } - - /** - * Get the customContext property: Custom Context of Incoming Call. - * - * @return the customContext value - */ - public CustomCallingContext getCustomContext() { - return this.customContext; - } - - /** - * Get the incomingCallContext property: Incoming call context. - * - * @return the incomingCallContext value. - */ - public String getIncomingCallContext() { - return this.incomingCallContext; - } - - /** - * Get the onBehalfOfCallee property: The communication identifier of the user who is being called on behalf of. - * - * @return the onBehalfOfCallee value. - */ - public CommunicationIdentifier getOnBehalfOfCallee() { - return this.onBehalfOfCallee; - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("to", CommunicationIdentifierConverter.convert(to)); - jsonWriter.writeJsonField("from", CommunicationIdentifierConverter.convert(from)); - jsonWriter.writeStringField("callerDisplayName", callerDisplayName); - jsonWriter.writeJsonField("customContext", customContext); - jsonWriter.writeStringField("incomingCallContext", incomingCallContext); - jsonWriter.writeJsonField("onBehalfOfCallee", CommunicationIdentifierConverter.convert(onBehalfOfCallee)); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IncomingCall from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IncomingCall if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the IncomingCall. - */ - public static IncomingCall fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final IncomingCall event = new IncomingCall(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if ("to".equals(fieldName)) { - event.to = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else if ("from".equals(fieldName)) { - event.from - = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else if ("callerDisplayName".equals(fieldName)) { - event.callerDisplayName = reader.getString(); - } else if ("customContext".equals(fieldName)) { - event.customContext = CustomCallingContext.fromJson(reader); - } else if ("incomingCallContext".equals(fieldName)) { - event.incomingCallContext = reader.getString(); - } else if ("onBehalfOfCallee".equals(fieldName)) { - event.onBehalfOfCallee - = CommunicationIdentifierConverter.convert(CommunicationIdentifierModel.fromJson(reader)); - } else { - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingFailed.java index 0e6b6378ebaa..9a2fc089d21e 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingFailed.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingFailed.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** The MediaStreamingFailed model. */ @Fluent public final class MediaStreamingFailed extends CallAutomationEventBase { @@ -18,7 +18,7 @@ public final class MediaStreamingFailed extends CallAutomationEventBase { * Defines the result for audio streaming update with the current status * and the details about the status */ - private MediaStreamingUpdate mediaStreamingUpdateResult; + private MediaStreamingUpdateResult mediaStreamingUpdateResult; /** * Creates an instance of MediaStreamingFailed class. @@ -31,9 +31,9 @@ public MediaStreamingFailed() { * Get the mediaStreamingUpdateResult property: Defines the result for audio streaming update with the current status and * the details about the status. * - * @return the mediaStreamingUpdate value. + * @return the MediaStreamingUpdateResult value. */ - public MediaStreamingUpdate getMediaStreamingUpdateResult() { + public MediaStreamingUpdateResult getMediaStreamingUpdateResult() { return this.mediaStreamingUpdateResult; } @@ -63,7 +63,7 @@ public static MediaStreamingFailed fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); if ("mediaStreamingUpdate".equals(fieldName)) { - event.mediaStreamingUpdateResult = MediaStreamingUpdate.fromJson(reader); + event.mediaStreamingUpdateResult = MediaStreamingUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStarted.java index 8da41bb754ca..24e4d2d92c81 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStarted.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStarted.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The MediaStreamingStarted model. */ @@ -17,9 +17,9 @@ public final class MediaStreamingStarted extends CallAutomationEventBase { /* - * Defines the result for MediaStreamingUpdate with the current status and the details about the status + * Defines the result for MediaStreamingUpdateResult with the current status and the details about the status */ - private MediaStreamingUpdate mediaStreamingUpdateResult; + private MediaStreamingUpdateResult mediaStreamingUpdateResult; /** * Creates an instance of MediaStreamingStarted class. @@ -34,7 +34,7 @@ public MediaStreamingStarted() { * * @return the mediaStreamingUpdateResult value. */ - public MediaStreamingUpdate getMediaStreamingUpdateResult() { + public MediaStreamingUpdateResult getMediaStreamingUpdateResult() { return this.mediaStreamingUpdateResult; } @@ -64,7 +64,7 @@ public static MediaStreamingStarted fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); if ("mediaStreamingUpdate".equals(fieldName)) { - event.mediaStreamingUpdateResult = MediaStreamingUpdate.fromJson(reader); + event.mediaStreamingUpdateResult = MediaStreamingUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStopped.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStopped.java index 5aabf848e050..e5724a20982a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStopped.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingStopped.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** The MediaStreamingStopped model. */ @Fluent public final class MediaStreamingStopped extends CallAutomationEventBase { @@ -18,7 +18,7 @@ public final class MediaStreamingStopped extends CallAutomationEventBase { * Defines the result for audio streaming update with the current status * and the details about the status */ - private MediaStreamingUpdate mediaStreamingUpdateResult; + private MediaStreamingUpdateResult mediaStreamingUpdateResult; /** * Creates an instance of MediaStreamingStopped class. @@ -31,9 +31,9 @@ public MediaStreamingStopped() { * Get the getMediaStreamingUpdateResult property: Defines the result for audio streaming update with the current status and * the details about the status. * - * @return the mediaStreamingUpdate value. + * @return the MediaStreamingUpdateResult value. */ - public MediaStreamingUpdate getMediaStreamingUpdateResult() { + public MediaStreamingUpdateResult getMediaStreamingUpdateResult() { return this.mediaStreamingUpdateResult; } @@ -63,7 +63,7 @@ public static MediaStreamingStopped fromJson(JsonReader jsonReader) throws IOExc String fieldName = reader.getFieldName(); reader.nextToken(); if ("mediaStreamingUpdate".equals(fieldName)) { - event.mediaStreamingUpdateResult = MediaStreamingUpdate.fromJson(reader); + event.mediaStreamingUpdateResult = MediaStreamingUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdateResult.java similarity index 87% rename from sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdate.java rename to sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdateResult.java index 48d664b87205..0ae3e52ab104 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdate.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/MediaStreamingUpdateResult.java @@ -3,17 +3,17 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - -/** The MediaStreamingUpdate model. */ +/** The MediaStreamingUpdateResult model. */ @Fluent -public final class MediaStreamingUpdate implements JsonSerializable { +public final class MediaStreamingUpdateResult implements JsonSerializable { /* * The contentType property. */ @@ -30,9 +30,9 @@ public final class MediaStreamingUpdate implements JsonSerializable { - final MediaStreamingUpdate event = new MediaStreamingUpdate(); + final MediaStreamingUpdateResult event = new MediaStreamingUpdateResult(); while (jsonReader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java deleted file mode 100644 index d9db803df0a2..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayPaused.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The PlayPaused model. */ -@Immutable -public final class PlayPaused extends CallAutomationEventBase { - - private PlayPaused() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlayPaused from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlayPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlayPaused. - */ - public static PlayPaused fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final PlayPaused event = new PlayPaused(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java deleted file mode 100644 index 4e336c05d3bd..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/PlayResumed.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** The PlayResumed model. */ -@Immutable -public final class PlayResumed extends CallAutomationEventBase { - - private PlayResumed() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PlayResumed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PlayPaused if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PlayResumed. - */ - public static PlayResumed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final PlayResumed event = new PlayResumed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java deleted file mode 100644 index 39616d313e21..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/StartRecordingFailed.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -package com.azure.communication.callautomation.models.events; - -import java.io.IOException; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; - -/** - * The StartRecordingFailed model. - */ -@Immutable -public final class StartRecordingFailed extends CallAutomationEventBase { - - private StartRecordingFailed() { - - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - super.writeFields(jsonWriter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of StartRecordingFailed from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of StartRecordingFailed if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the StartRecordingFailed. - */ - public static StartRecordingFailed fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - final StartRecordingFailed event = new StartRecordingFailed(); - while (jsonReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - if (!event.readField(fieldName, reader)) { - reader.skipChildren(); - } - } - return event; - }); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionFailed.java index 2e4ffa38f23a..6f9335b2343c 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionFailed.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionFailed.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The TranscriptionFailed model. */ @@ -17,9 +17,9 @@ public final class TranscriptionFailed extends CallAutomationEventBase { /* - * Defines the result for TranscriptionUpdate with the current status and the details about the status + * Defines the result for TranscriptionUpdateResult with the current status and the details about the status */ - private TranscriptionUpdate transcriptionUpdateResult; + private TranscriptionUpdateResult transcriptionUpdateResult; /** * Creates an instance of TranscriptionFailed class. @@ -29,12 +29,12 @@ public TranscriptionFailed() { } /** - * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status + * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdateResult with the current status * and the details about the status. * * @return the transcriptionUpdateResult value. */ - public TranscriptionUpdate getTranscriptionUpdateResult() { + public TranscriptionUpdateResult getTranscriptionUpdateResult() { return this.transcriptionUpdateResult; } @@ -64,7 +64,7 @@ public static TranscriptionFailed fromJson(JsonReader jsonReader) throws IOExcep String fieldName = reader.getFieldName(); reader.nextToken(); if ("transcriptionUpdate".equals(fieldName)) { - event.transcriptionUpdateResult = TranscriptionUpdate.fromJson(reader); + event.transcriptionUpdateResult = TranscriptionUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionResumed.java index dfe1d58966e0..646166626ece 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionResumed.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionResumed.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The TranscriptionResumed model. */ @@ -17,9 +17,9 @@ public final class TranscriptionResumed extends CallAutomationEventBase { /* - * Defines the result for TranscriptionUpdate with the current status and the details about the status + * Defines the result for TranscriptionUpdateResult with the current status and the details about the status */ - private TranscriptionUpdate transcriptionUpdateResult; + private TranscriptionUpdateResult transcriptionUpdateResult; /** * Creates an instance of TranscriptionResumed class. @@ -29,12 +29,12 @@ public TranscriptionResumed() { } /** - * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status + * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdateResult with the current status * and the details about the status. * * @return the transcriptionUpdateResult value. */ - public TranscriptionUpdate getTranscriptionUpdateResult() { + public TranscriptionUpdateResult getTranscriptionUpdateResult() { return this.transcriptionUpdateResult; } @@ -64,7 +64,7 @@ public static TranscriptionResumed fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); if ("transcriptionUpdate".equals(fieldName)) { - event.transcriptionUpdateResult = TranscriptionUpdate.fromJson(reader); + event.transcriptionUpdateResult = TranscriptionUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStarted.java index 4c147b284dd9..de80f2b19807 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStarted.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStarted.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The TranscriptionStarted model. */ @@ -17,9 +17,9 @@ public final class TranscriptionStarted extends CallAutomationEventBase { /* - * Defines the result for TranscriptionUpdate with the current status and the details about the status + * Defines the result for TranscriptionUpdateResult with the current status and the details about the status */ - private TranscriptionUpdate transcriptionUpdateResult; + private TranscriptionUpdateResult transcriptionUpdateResult; /** * Creates an instance of TranscriptionStarted class. @@ -29,12 +29,12 @@ public TranscriptionStarted() { } /** - * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status + * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdateResult with the current status * and the details about the status. * * @return the transcriptionUpdateResult value. */ - public TranscriptionUpdate getTranscriptionUpdateResult() { + public TranscriptionUpdateResult getTranscriptionUpdateResult() { return this.transcriptionUpdateResult; } @@ -64,7 +64,7 @@ public static TranscriptionStarted fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); if ("transcriptionUpdate".equals(fieldName)) { - event.transcriptionUpdateResult = TranscriptionUpdate.fromJson(reader); + event.transcriptionUpdateResult = TranscriptionUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStopped.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStopped.java index 51d915f9653c..8a721f4072a9 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStopped.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionStopped.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The TranscriptionStopped model. */ @@ -17,9 +17,9 @@ public final class TranscriptionStopped extends CallAutomationEventBase { /* - * Defines the result for TranscriptionUpdate with the current status and the details about the status + * Defines the result for TranscriptionUpdateResult with the current status and the details about the status */ - private TranscriptionUpdate transcriptionUpdateResult; + private TranscriptionUpdateResult transcriptionUpdateResult; /** * Creates an instance of TranscriptionStopped class. @@ -29,12 +29,12 @@ public TranscriptionStopped() { } /** - * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status + * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdateResult with the current status * and the details about the status. * * @return the transcriptionUpdateResult value. */ - public TranscriptionUpdate getTranscriptionUpdateResult() { + public TranscriptionUpdateResult getTranscriptionUpdateResult() { return this.transcriptionUpdateResult; } @@ -64,7 +64,7 @@ public static TranscriptionStopped fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); if ("transcriptionUpdate".equals(fieldName)) { - event.transcriptionUpdateResult = TranscriptionUpdate.fromJson(reader); + event.transcriptionUpdateResult = TranscriptionUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdateResult.java similarity index 85% rename from sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdate.java rename to sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdateResult.java index da7eca4a1a76..71bdc06596ac 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdate.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdateResult.java @@ -3,19 +3,19 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonSerializable; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** - * The TranscriptionUpdate model. + * The TranscriptionUpdateResult model. */ @Fluent -public final class TranscriptionUpdate implements JsonSerializable { +public final class TranscriptionUpdateResult implements JsonSerializable { /* * The transcriptionStatus property. */ @@ -27,9 +27,9 @@ public final class TranscriptionUpdate implements JsonSerializable { - final TranscriptionUpdate event = new TranscriptionUpdate(); + final TranscriptionUpdateResult event = new TranscriptionUpdateResult(); while (jsonReader.nextToken() != JsonToken.END_OBJECT) { String fieldName = reader.getFieldName(); reader.nextToken(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdated.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdated.java index 030ce0b46dff..65daf7369ec8 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdated.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/TranscriptionUpdated.java @@ -3,13 +3,13 @@ package com.azure.communication.callautomation.models.events; +import java.io.IOException; + import com.azure.core.annotation.Fluent; import com.azure.json.JsonReader; import com.azure.json.JsonToken; import com.azure.json.JsonWriter; -import java.io.IOException; - /** * The TranscriptionUpdated model. */ @@ -17,9 +17,9 @@ public final class TranscriptionUpdated extends CallAutomationEventBase { /* - * Defines the result for TranscriptionUpdate with the current status and the details about the status + * Defines the result for TranscriptionUpdateResult with the current status and the details about the status */ - private TranscriptionUpdate transcriptionUpdateResult; + private TranscriptionUpdateResult transcriptionUpdateResult; /** * Creates an instance of TranscriptionUpdated class. @@ -29,12 +29,12 @@ public TranscriptionUpdated() { } /** - * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status + * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdateResult with the current status * and the details about the status. * * @return the transcriptionUpdateResult value. */ - public TranscriptionUpdate getTranscriptionUpdateResult() { + public TranscriptionUpdateResult getTranscriptionUpdateResult() { return this.transcriptionUpdateResult; } @@ -64,7 +64,7 @@ public static TranscriptionUpdated fromJson(JsonReader jsonReader) throws IOExce String fieldName = reader.getFieldName(); reader.nextToken(); if ("transcriptionUpdate".equals(fieldName)) { - event.transcriptionUpdateResult = TranscriptionUpdate.fromJson(reader); + event.transcriptionUpdateResult = TranscriptionUpdateResult.fromJson(reader); } else { if (!event.readField(fieldName, reader)) { reader.skipChildren(); diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java b/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java index bda469a80dd0..b8a1cc7c42ea 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/module-info.java @@ -9,7 +9,6 @@ exports com.azure.communication.callautomation; exports com.azure.communication.callautomation.models; exports com.azure.communication.callautomation.models.events; - exports com.azure.communication.callautomation.implementation.eventprocessor; // exporting some packages specifically for azure-core opens com.azure.communication.callautomation.implementation.models to com.azure.core; diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java index 7b5c107f1c2d..9d27fa209ebb 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientAutomatedLiveTests.java @@ -196,7 +196,7 @@ public void createVOIPCallAndRejectAutomatedTest(HttpClient httpClient) { assertNotNull(callerConnectionId); // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); + String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(20)); assertNotNull(incomingCallContext); // rejet the call @@ -213,121 +213,6 @@ public void createVOIPCallAndRejectAutomatedTest(HttpClient httpClient) { } } - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hang up the call. - * 5. once call is hung up, verify disconnected event - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient).addPolicy( - (context, next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationIdentifier target = identityAsyncClient.createUser().block(); - - // Create call automation client and use source as the caller. - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, - next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, - next) -> logHeaders("createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, target); - - // create a call - List targets = new ArrayList<>(Collections.singletonList(target)); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - answerCallOptions.getCustomCallingContext().addSipUui("OBOuuivalue"); - answerCallOptions.getCustomCallingContext().addSipX("XheaderOBO", "value"); - - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - String receiverConnectionId = answerCallResult.getCallConnectionProperties().getCallConnectionId(); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // check events to caller side - CallConnected callerCallConnected - = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - ParticipantsUpdated callerParticipantUpdatedEvent - = waitForEvent(ParticipantsUpdated.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callerCallConnected); - assertNotNull(callerParticipantUpdatedEvent); - - // check events to receiver side - CallConnected receiverCallConnected - = waitForEvent(CallConnected.class, receiverConnectionId, Duration.ofSeconds(10)); - ParticipantsUpdated receiverParticipantUpdatedEvent - = waitForEvent(ParticipantsUpdated.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(receiverCallConnected); - assertNotNull(receiverParticipantUpdatedEvent); - - // hang up the call. - answerCallResult.getCallConnectionAsync().hangUp(true).block(); - - // check if both parties had the call terminated. - CallDisconnected callerCallDisconnected - = waitForEvent(CallDisconnected.class, receiverConnectionId, Duration.ofSeconds(10)); - CallDisconnected receiverCallDisconnected - = waitForEvent(CallDisconnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callerCallDisconnected); - assertNotNull(receiverCallDisconnected); - - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } - @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") @DisabledIfEnvironmentVariable( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java index b3148f6c8baa..b44f72d2f7a1 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java @@ -112,25 +112,6 @@ public void answerCall() { assertNotNull(answerCallResult); } - @Test - public void answerCallWithResponseAndCustomContext() { - CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID, - CALL_SERVER_CALL_ID, CALL_CALLER_ID, CALL_CALLER_DISPLAY_NAME, CALL_TARGET_ID, CALL_CONNECTION_STATE, - CALL_SUBJECT, CALL_CALLBACK_URL, null, null), 200)))); - - AnswerCallOptions answerCallOptions = new AnswerCallOptions(CALL_INCOMING_CALL_CONTEXT, CALL_CALLBACK_URL); - answerCallOptions.getCustomCallingContext().addSipUui("OBOuuivalue"); - answerCallOptions.getCustomCallingContext().addSipX("XheaderOBO", "value"); - - Response answerCallResult - = callAutomationAsyncClient.answerCallWithResponse(answerCallOptions).block(); - - assertNotNull(answerCallResult); - assertEquals(200, answerCallResult.getStatusCode()); - assertNotNull(answerCallResult.getValue()); - } - @Test public void answerCallWithResponse() { CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java index 48f02f12d437..138902f8c85b 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java @@ -7,15 +7,12 @@ import com.azure.communication.callautomation.models.AnswerCallResult; import com.azure.communication.callautomation.models.CallInvite; import com.azure.communication.callautomation.models.CallRejectReason; -import com.azure.communication.callautomation.models.CreateCallOptions; import com.azure.communication.callautomation.models.CreateGroupCallOptions; import com.azure.communication.callautomation.models.CreateCallResult; import com.azure.communication.callautomation.models.RedirectCallOptions; import com.azure.communication.callautomation.models.RejectCallOptions; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.common.MicrosoftTeamsAppIdentifier; -import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import org.junit.jupiter.api.Test; @@ -66,26 +63,6 @@ public void createCallWithResponse() { assertNotNull(createCallResult.getValue()); } - @Test - public void createTeamsAppCallWithResponse() { - MicrosoftTeamsAppIdentifier caller = new MicrosoftTeamsAppIdentifier(TEAMS_APP_CALL_CALLER_ID); - - CallAutomationClient callAutomationClient = getCallAutomationClient(new ArrayList<>(Collections - .singletonList(new SimpleEntry<>(generateTeamsAppCallProperties(CALL_CONNECTION_ID, CALL_SERVER_CALL_ID, - CALL_TARGET_ID, CALL_CONNECTION_STATE, CALL_CALLBACK_URL, TEAMS_APP_CALL_CALLER_ID), 201)))); - PhoneNumberIdentifier target = new PhoneNumberIdentifier(CALL_TARGET_ID); - - Response createCallResult = callAutomationClient.createCallWithResponse( - new CreateCallOptions(new CallInvite(target, null), CALL_CALLBACK_URL).setTeamsAppSource(caller), - Context.NONE); - - assertNotNull(createCallResult); - assertEquals(201, createCallResult.getStatusCode()); - assertEquals(TEAMS_APP_CALL_CALLER_ID, - ((MicrosoftTeamsAppIdentifier) (createCallResult.getValue().getCallConnectionProperties().getSource())) - .getAppId()); - } - @Test public void answerCall() { CallAutomationClient callAutomationClient = getCallAutomationClient( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java deleted file mode 100644 index dad2eb6fe612..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserAndProcessorUnitTests.java +++ /dev/null @@ -1,1442 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.ChoiceResult; -import com.azure.communication.callautomation.models.CustomCallingContext; -import com.azure.communication.callautomation.models.DtmfResult; -import com.azure.communication.callautomation.models.RecognizeResult; -import com.azure.communication.callautomation.models.RecordingState; -import com.azure.communication.callautomation.models.events.AnswerFailed; -import com.azure.communication.callautomation.models.events.CallAutomationEventBase; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.CallTransferAccepted; -import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed; -import com.azure.communication.callautomation.models.events.CancelAddParticipantSucceeded; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionStopped; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneFailed; -import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneReceived; -import com.azure.communication.callautomation.models.events.CreateCallFailed; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogConsent; -import com.azure.communication.callautomation.models.events.DialogFailed; -import com.azure.communication.callautomation.models.events.DialogHangup; -import com.azure.communication.callautomation.models.events.DialogLanguageChange; -import com.azure.communication.callautomation.models.events.DialogSensitivityUpdate; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.callautomation.models.events.DialogTransfer; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; -import com.azure.communication.callautomation.models.events.HoldFailed; -import com.azure.communication.callautomation.models.events.ParticipantsUpdated; -import com.azure.communication.callautomation.models.events.PlayCanceled; -import com.azure.communication.callautomation.models.events.PlayCompleted; -import com.azure.communication.callautomation.models.events.PlayPaused; -import com.azure.communication.callautomation.models.events.PlayResumed; -import com.azure.communication.callautomation.models.events.PlayFailed; -import com.azure.communication.callautomation.models.events.ReasonCode; -import com.azure.communication.callautomation.models.events.ReasonCode.Recognize; -import com.azure.communication.callautomation.models.events.RecognizeCanceled; -import com.azure.communication.callautomation.models.events.RecognizeCompleted; -import com.azure.communication.callautomation.models.events.RecognizeFailed; -import com.azure.communication.callautomation.models.events.RecordingStateChanged; -import com.azure.communication.callautomation.models.events.RemoveParticipantFailed; -import com.azure.communication.callautomation.models.events.RemoveParticipantSucceeded; -import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; -import com.azure.communication.callautomation.models.events.SendDtmfTonesFailed; -import com.azure.communication.callautomation.models.events.TranscriptionFailed; -import com.azure.communication.callautomation.models.events.TranscriptionResumed; -import com.azure.communication.callautomation.models.events.TranscriptionStarted; -import com.azure.communication.callautomation.models.events.TranscriptionStatus; -import com.azure.communication.callautomation.models.events.TranscriptionStatusDetails; -import com.azure.communication.callautomation.models.events.TranscriptionStopped; -import com.azure.communication.callautomation.models.events.TranscriptionUpdated; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.PhoneNumberIdentifier; -import com.azure.communication.callautomation.models.events.MediaStreamingStarted; -import com.azure.communication.callautomation.models.events.MediaStreamingStopped; -import com.azure.communication.callautomation.models.events.MediaStreamingFailed; -import com.azure.communication.callautomation.models.events.MediaStreamingStatus; -import com.azure.communication.callautomation.models.events.MediaStreamingStatusDetails; -import com.azure.communication.callautomation.models.events.IncomingCall; -import org.junit.jupiter.api.Test; - -import java.util.List; -import java.util.Objects; -import java.util.Optional; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertInstanceOf; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallAutomationEventParserAndProcessorUnitTests { - static final String EVENT_PARTICIPANT_UPDATED - = "{\"id\":\"61069ef9-5ca9-457f-ac36-e2bb5e8400ca\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\": {\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff6-dd51-54b7-a43a0d001998\"}}, \"isMuted\": false, \"isOnHold\": false},{\"identifier\": {\"rawId\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"8:acs:816df1ca-971b-44d7-b8b1-8fba90748500_00000013-2ff7-1579-99bf-a43a0d0010bc\"}}, \"isMuted\": false, \"isOnHold\": false}],\"type\":\"participantsUpdated\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.9129474+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/ParticipantsUpdated\"}"; - static final String EVENT_CALL_CONNECTED - = "{\"id\":\"46116fb7-27e0-4a99-9478-a659c8fd4815\",\"source\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"type\":\"callConnected\",\"callConnectionId\":\"401f3500-62bd-46a9-8c09-9e1b06caca01\",\"correlationId\":\"ebd8bf1f-0794-494f-bdda-913042c06ef7\"},\"time\":\"2022-08-12T03:35:07.8174402+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/401f3500-62bd-46a9-8c09-9e1b06caca01/CallConnected\"}"; - static final String EVENT_RECOGNIZE_DTMF - = "[{\"id\":\"ac2cb537-2d62-48bf-909e-cc93534c4258\",\"source\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"type\":\"Microsoft.Communication.RecognizeCompleted\",\"data\":{\"eventSource\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"operationContext\":\"OperationalContextValue-1118-1049\",\"resultInformation\":{\"code\":200,\"subCode\":8533,\"message\":\"Action completed, DTMF option matched.\"},\"recognitionType\":\"dtmf\",\"dtmfResult\":{\"tones\":[\"five\", \"six\", \"pound\"]},\"choiceResult\":{\"label\":\"Marketing\"},\"callConnectionId\":\"401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"serverCallId\":\"serverCallId\",\"correlationId\":\"d4f4c1be-59d8-4850-b9bf-ee564c15839d\"},\"time\":\"2022-11-22T01:41:44.5582769+00:00\",\"specversion\":\"1.0\",\"subject\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\"}]"; - static final String EVENT_RECOGNIZE_CHOICE - = "[{\"id\":\"e25b99ef-3632-45bb-96d1-d9191547ff33\",\"source\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"type\":\"Microsoft.Communication.RecognizeCompleted\",\"data\":{\"eventSource\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"operationContext\":\"OperationalContextValue-1118-1049\",\"resultInformation\":{\"code\":200,\"subCode\":8545,\"message\":\"Action completed, Recognized phrase matches a valid option.\"},\"recognitionType\":\"choices\",\"choiceResult\":{\"label\":\"Support\",\"recognizedPhrase\":\"customer help\"},\"callConnectionId\":\"401f7000-c1c0-41e2-962d-85d0dc1d6f01\",\"serverCallId\":\"serverCallId\",\"correlationId\":\"d4f4c1be-59d8-4850-b9bf-ee564c15839d\"},\"time\":\"2022-11-22T01:41:00.1967145+00:00\",\"specversion\":\"1.0\",\"subject\":\"calling/callConnections/401f7000-c1c0-41e2-962d-85d0dc1d6f01\"}]"; - - @Test - public void parseEvent() { - CallAutomationEventBase callAutomationEvent - = CallAutomationEventParser.parseEvents(EVENT_PARTICIPANT_UPDATED).get(0); - - assertNotNull(callAutomationEvent); - assertEquals(callAutomationEvent.getClass(), ParticipantsUpdated.class); - ParticipantsUpdated participantsUpdated = (ParticipantsUpdated) callAutomationEvent; - assertNotNull((participantsUpdated).getParticipants()); - participantsUpdated.getParticipants().forEach(participant -> { - assertNotNull(participant); - assertNotNull(participant.getIdentifier()); - assertNotNull(participant.isMuted()); - assertNotNull(participant.isOnHold()); - }); - } - - @Test - public void parseEventList() { - List callAutomationEventList - = CallAutomationEventParser.parseEvents("[" + EVENT_CALL_CONNECTED + "," + EVENT_PARTICIPANT_UPDATED + "]"); - - assertNotNull(callAutomationEventList); - assertEquals(callAutomationEventList.get(0).getClass(), CallConnected.class); - assertEquals(callAutomationEventList.get(1).getClass(), ParticipantsUpdated.class); - assertNotNull(callAutomationEventList.get(0).getCallConnectionId()); - } - - @Test - public void parseRecordingStateChangedEvent() { - String receivedEvent = "[\n" + " {\n" + " \"id\": \"bf59843a-888f-47ca-8d1c-885c1f5e71dc\",\n" - + " \"source\": \"calling/recordings/serverCallId/recordingId/recordingId/RecordingStateChanged\",\n" - + " \"type\": \"Microsoft.Communication.RecordingStateChanged\",\n" + " \"data\": {\n" - + " \"type\": \"recordingStateChanged\",\n" + " \"recordingId\": \"recordingId\",\n" - + " \"state\": \"active\",\n" - + " \"startDateTime\": \"2022-08-11T23:42:45.4394211+00:00\",\n" - + " \"callConnectionId\": \"callConnectionId\",\n" - + " \"serverCallId\": \"serverCallId\",\n" + " \"correlationId\": \"correlationId\"\n" - + " },\n" + " \"time\": \"2022-08-11T23:42:45.5346632+00:00\",\n" - + " \"specversion\": \"1.0\",\n" + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/recordings/serverCallId/recordingId/recordingId\"\n" + " }\n" + "]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecordingStateChanged recordingEvent = (RecordingStateChanged) event; - assertNotNull(recordingEvent); - assertEquals("serverCallId", recordingEvent.getServerCallId()); - assertEquals("recordingId", recordingEvent.getRecordingId()); - assertEquals(RecordingState.ACTIVE, recordingEvent.getRecordingState()); - } - - @Test - public void parsePlayCompletedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayCompleted\",\n" - + "\"type\": \"Microsoft.Communication.PlayCompleted\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"playCompleted\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayCompleted playCompleted = (PlayCompleted) event; - assertNotNull(playCompleted); - assertEquals("serverCallId", playCompleted.getServerCallId()); - assertEquals(200, playCompleted.getResultInformation().getCode()); - assertEquals(ReasonCode.COMPLETED_SUCCESSFULLY, playCompleted.getReasonCode()); - } - - @Test - public void parsePlayFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayFailed\",\n" - + "\"type\": \"Microsoft.Communication.PlayFailed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 400,\n" + "\"subCode\": 8536,\n" - + "\"message\": \"Action failed, file could not be downloaded.\"\n" + "},\n" + "\"type\": \"playFailed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayFailed playFailed = (PlayFailed) event; - assertNotNull(playFailed); - assertEquals("serverCallId", playFailed.getServerCallId()); - assertEquals(400, playFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Play.DOWNLOAD_FAILED, playFailed.getReasonCode()); - } - - @Test - public void parsePlayCanceledEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayCanceled\",\n" - + "\"type\": \"Microsoft.Communication.PlayCanceled\",\n" + "\"data\": {\n" - + "\"type\": \"playCanceled\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayCanceled playCanceled = (PlayCanceled) event; - assertNotNull(playCanceled); - assertEquals("serverCallId", playCanceled.getServerCallId()); - } - - @Test - public void parseRecognizeCompletedWithChoiceEvent() { - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(EVENT_RECOGNIZE_CHOICE).get(0); - assertNotNull(event); - RecognizeCompleted recognizeCompleted = (RecognizeCompleted) event; - assertNotNull(recognizeCompleted); - Optional choiceResult = recognizeCompleted.getRecognizeResult(); - assertInstanceOf(ChoiceResult.class, choiceResult.get()); - assertEquals("serverCallId", recognizeCompleted.getServerCallId()); - assertEquals(200, recognizeCompleted.getResultInformation().getCode()); - assertEquals(Recognize.SPEECH_OPTION_MATCHED, recognizeCompleted.getReasonCode()); - } - - @Test - public void parseRecognizeCompletedWithDtmfEvent() { - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(EVENT_RECOGNIZE_DTMF).get(0); - assertNotNull(event); - RecognizeCompleted recognizeCompleted = (RecognizeCompleted) event; - Optional dtmfResult = recognizeCompleted.getRecognizeResult(); - DtmfResult tonesResult = (DtmfResult) dtmfResult.get(); - assertInstanceOf(DtmfResult.class, dtmfResult.get()); - String tonesInString = tonesResult.convertToString(); - assertEquals(tonesInString, "56#"); - assertNotNull(recognizeCompleted); - assertEquals("serverCallId", recognizeCompleted.getServerCallId()); - assertEquals(200, recognizeCompleted.getResultInformation().getCode()); - assertEquals(Recognize.DMTF_OPTION_MATCHED, recognizeCompleted.getReasonCode()); - } - - @Test - public void parseRecognizeFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/RecognizeCompleted\",\n" - + "\"type\": \"Microsoft.Communication.RecognizeFailed\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 400,\n" + "\"subCode\": 8510,\n" - + "\"message\": \"Action failed, initial silence timeout reached.\"\n" + "},\n" - + "\"type\": \"recognizeFailed\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecognizeFailed recognizeFailed = (RecognizeFailed) event; - assertNotNull(recognizeFailed); - assertEquals("serverCallId", recognizeFailed.getServerCallId()); - assertEquals(400, recognizeFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Recognize.INITIAL_SILENCE_TIMEOUT, recognizeFailed.getReasonCode()); - } - - @Test - public void parseRecognizeCanceledEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/RecognizeCanceled\",\n" - + "\"type\": \"Microsoft.Communication.RecognizeCanceled\",\n" + "\"data\": {\n" - + "\"type\": \"recognizeCanceled\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - RecognizeCanceled recognizeCanceled = (RecognizeCanceled) event; - assertNotNull(recognizeCanceled); - assertEquals("serverCallId", recognizeCanceled.getServerCallId()); - } - - @Test - public void parseAndProcessRemoveParticipantSucceededEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.RemoveParticipantSucceeded\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"participant\": {\n" + "\"rawId\": \"rawId\",\n" - + "\"phoneNumber\": {\n" + "\"value\": \"value\"\n" + "}\n" + "},\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - - RemoveParticipantSucceeded removeParticipantSucceeded = (RemoveParticipantSucceeded) event; - - assertNotNull(removeParticipantSucceeded); - assertEquals("serverCallId", removeParticipantSucceeded.getServerCallId()); - assertEquals("callConnectionId", removeParticipantSucceeded.getCallConnectionId()); - assertEquals("rawId", removeParticipantSucceeded.getParticipant().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.processEvents(receivedEvent); - RemoveParticipantSucceeded eventFromProcessor - = callAutomationEventProcessor.waitForEventProcessor(removeParticipantSucceeded.getCallConnectionId(), - removeParticipantSucceeded.getOperationContext(), RemoveParticipantSucceeded.class); - assertEquals("serverCallId", eventFromProcessor.getServerCallId()); - assertEquals("callConnectionId", eventFromProcessor.getCallConnectionId()); - assertEquals("rawId", eventFromProcessor.getParticipant().getRawId()); - } - - @Test - public void parseAndProcessRemoveParticipantFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.RemoveParticipantFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"participant\": {\n" + "\"rawId\": \"rawId\",\n" - + "\"phoneNumber\": {\n" + "\"value\": \"value\"\n" + "}\n" + "},\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - RemoveParticipantFailed removeParticipantFailed = (RemoveParticipantFailed) event; - - assertNotNull(removeParticipantFailed); - assertEquals("serverCallId", removeParticipantFailed.getServerCallId()); - assertEquals("callConnectionId", removeParticipantFailed.getCallConnectionId()); - assertEquals("rawId", removeParticipantFailed.getParticipant().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor - .waitForEventProcessorAsync(removeParticipantFailed.getCallConnectionId(), - removeParticipantFailed.getOperationContext(), RemoveParticipantFailed.class) - .subscribe(eventFromProcessor -> { - assertEquals("serverCallId", eventFromProcessor.getServerCallId()); - assertEquals("callConnectionId", eventFromProcessor.getCallConnectionId()); - assertEquals("rawId", eventFromProcessor.getParticipant().getRawId()); - }); - callAutomationEventProcessor.processEvents(receivedEvent); - } - - @Test - public void parseContinuousDtmfRecognitionToneReceivedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionToneReceived\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"DTMF tone received successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionToneReceived\",\n" + " \"sequenceId\":1,\n" - + " \"tone\":\"eight\",\n" + " \"callConnectionId\":\"callConnectionId\",\n" - + " \"serverCallId\":\"serverCallId\",\n" + " \"correlationId\":\"correlationId\",\n" - + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneReceived\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionToneReceived continuousDtmfRecognitionToneReceived - = (ContinuousDtmfRecognitionToneReceived) event; - - assertNotNull(continuousDtmfRecognitionToneReceived); - assertEquals("serverCallId", continuousDtmfRecognitionToneReceived.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionToneReceived.getCallConnectionId()); - assertEquals("eight", continuousDtmfRecognitionToneReceived.getTone().toString()); - assertEquals(1, continuousDtmfRecognitionToneReceived.getSequenceId()); - assertEquals("correlationId", continuousDtmfRecognitionToneReceived.getCorrelationId()); - assertEquals(200, continuousDtmfRecognitionToneReceived.getResultInformation().getCode()); - assertEquals(0, continuousDtmfRecognitionToneReceived.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionToneReceived.getOperationContext()); - assertEquals("DTMF tone received successfully.", - continuousDtmfRecognitionToneReceived.getResultInformation().getMessage()); - } - - @Test - public void parseContinuousDtmfRecognitionToneFailedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionToneFailed\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\",\n" - + " \"resultInformation\":{\n" + " \"code\":400,\n" + " \"subCode\":12323,\n" - + " \"message\":\"Continuous DTMF tone Couldn't be received successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionToneFailed\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionToneFailed\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionToneFailed continuousDtmfRecognitionToneFailed - = (ContinuousDtmfRecognitionToneFailed) event; - - assertNotNull(continuousDtmfRecognitionToneFailed); - assertEquals("serverCallId", continuousDtmfRecognitionToneFailed.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionToneFailed.getCallConnectionId()); - assertEquals("correlationId", continuousDtmfRecognitionToneFailed.getCorrelationId()); - assertEquals(400, continuousDtmfRecognitionToneFailed.getResultInformation().getCode()); - assertEquals(12323, continuousDtmfRecognitionToneFailed.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionToneFailed.getOperationContext()); - assertEquals("Continuous DTMF tone Couldn't be received successfully.", - continuousDtmfRecognitionToneFailed.getResultInformation().getMessage()); - } - - @Test - public void parseContinuousDtmfRecognitionStoppedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\",\n" - + " \"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Continuous DTMF Recognition stopped successfully.\"\n" + " },\n" - + " \"type\":\"ContinuousDtmfRecognitionStopped\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/ContinuousDtmfRecognitionStopped\"\n" - + " }\n" + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - ContinuousDtmfRecognitionStopped continuousDtmfRecognitionStopped = (ContinuousDtmfRecognitionStopped) event; - - assertNotNull(continuousDtmfRecognitionStopped); - assertEquals("serverCallId", continuousDtmfRecognitionStopped.getServerCallId()); - assertEquals("callConnectionId", continuousDtmfRecognitionStopped.getCallConnectionId()); - assertEquals("correlationId", continuousDtmfRecognitionStopped.getCorrelationId()); - assertEquals(200, continuousDtmfRecognitionStopped.getResultInformation().getCode()); - assertEquals(0, continuousDtmfRecognitionStopped.getResultInformation().getSubCode()); - assertEquals("context", continuousDtmfRecognitionStopped.getOperationContext()); - assertEquals("Continuous DTMF Recognition stopped successfully.", - continuousDtmfRecognitionStopped.getResultInformation().getMessage()); - } - - @Test - public void parseSendDtmfTonesCompletedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\",\n" - + " \"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\n" - + " \"specversion\":\"1.0\",\n" + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Send DTMF completed successfully.\"\n" + " },\n" - + " \"type\":\"SendDtmfTonesCompleted\",\n" - + " \"callConnectionId\":\"callConnectionId\",\n" + " \"serverCallId\":\"serverCallId\",\n" - + " \"correlationId\":\"correlationId\",\n" + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/SendDtmfTonesCompleted\"\n" + " }\n" - + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - SendDtmfTonesCompleted sendDtmfTonesCompleted = (SendDtmfTonesCompleted) event; - - assertNotNull(sendDtmfTonesCompleted); - assertEquals("serverCallId", sendDtmfTonesCompleted.getServerCallId()); - assertEquals("callConnectionId", sendDtmfTonesCompleted.getCallConnectionId()); - assertEquals("correlationId", sendDtmfTonesCompleted.getCorrelationId()); - assertEquals(200, sendDtmfTonesCompleted.getResultInformation().getCode()); - assertEquals(0, sendDtmfTonesCompleted.getResultInformation().getSubCode()); - assertEquals("context", sendDtmfTonesCompleted.getOperationContext()); - assertEquals("Send DTMF completed successfully.", sendDtmfTonesCompleted.getResultInformation().getMessage()); - } - - @Test - public void parseSendDtmfTonesFailedEvent() { - - String receivedEvent = "[\n" + " {\n" + " \"id\":\"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + " \"source\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\",\n" - + " \"type\":\"Microsoft.Communication.SendDtmfTonesFailed\",\n" + " \"specversion\":\"1.0\",\n" - + " \"data\":{\n" - + " \"eventSource\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\",\n" - + " \"resultInformation\":{\n" + " \"code\":200,\n" + " \"subCode\":0,\n" - + " \"message\":\"Send DTMF couldn't be completed successfully.\"\n" + " },\n" - + " \"type\":\"SendDtmfTonesFailed\",\n" + " \"callConnectionId\":\"callConnectionId\",\n" - + " \"serverCallId\":\"serverCallId\",\n" + " \"correlationId\":\"correlationId\",\n" - + " \"operationContext\":\"context\",\n" - + " \"time\":\"2022-08-12T03:13:25.0252763+00:00\",\n" + " \"specversion\":\"1.0\",\n" - + " \"datacontenttype\":\"application/json\",\n" - + " \"subject\":\"calling/callConnections/callConnectionId/SendDtmfTonesFailed\"\n" + " }\n" - + " }\n" + "]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - SendDtmfTonesFailed sendDtmfTonesFailed = (SendDtmfTonesFailed) event; - - assertNotNull(sendDtmfTonesFailed); - assertEquals("serverCallId", sendDtmfTonesFailed.getServerCallId()); - assertEquals("callConnectionId", sendDtmfTonesFailed.getCallConnectionId()); - assertEquals("correlationId", sendDtmfTonesFailed.getCorrelationId()); - assertEquals(200, sendDtmfTonesFailed.getResultInformation().getCode()); - assertEquals(0, sendDtmfTonesFailed.getResultInformation().getSubCode()); - assertEquals("context", sendDtmfTonesFailed.getOperationContext()); - assertEquals("Send DTMF couldn't be completed successfully.", - sendDtmfTonesFailed.getResultInformation().getMessage()); - } - - @Test - public void parseTransferAccptedEvent() { - String receivedEvent = "[\n" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/411f0b00-dc73-4528-a9e6-968ba983d2a1\",\n" - + " \"type\": \"Microsoft.Communication.CallTransferAccepted\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" - + " \"subCode\": 7015,\n" - + " \"message\": \"The transfer operation completed successfully.\"\n" + " },\n" - + " \"transferTarget\": {\n" - + " \"rawId\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e\",\n" - + " \"kind\": \"communicationUser\",\n" + " \"communicationUser\": {\n" - + " \"id\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e\"\n" - + " }\n" + " },\n" + " \"transferee\": {\n" - + " \"rawId\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434\",\n" - + " \"kind\": \"communicationUser\",\n" + " \"communicationUser\": {\n" - + " \"id\": \"8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434\"\n" - + " }\n" + " },\n" - + " \"callConnectionId\": \"411f0b00-dc73-4528-a9e6-968ba983d2a1\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=\",\n" - + " \"correlationId\": \"be43dd55-38e9-4de8-9d75-e20b6b32744f\"\n" + " },\n" - + " \"time\": \"2023-07-19T18:31:16.6795146+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/411f0b00-dc73-4528-a9e6-968ba983d2a1\"\n" + " }\n" - + "]"; - CallTransferAccepted event = (CallTransferAccepted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=", - event.getServerCallId()); - assertEquals("411f0b00-dc73-4528-a9e6-968ba983d2a1", event.getCallConnectionId()); - assertEquals("be43dd55-38e9-4de8-9d75-e20b6b32744f", event.getCorrelationId()); - assertEquals("The transfer operation completed successfully.", event.getResultInformation().getMessage()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e", - event.getTransferTarget().getRawId()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434", - event.getTransferee().getRawId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.processEvents(receivedEvent); - CallAutomationEventBase eventComing = callAutomationEventProcessor.waitForEventProcessor( - eventFromProcessor -> Objects.equals(event.getServerCallId(), eventFromProcessor.getServerCallId()) - && Objects.equals(event.getCallConnectionId(), eventFromProcessor.getCallConnectionId())); - - assertNotNull(eventComing); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDEuY29udi5za3lwZS5jb20vY29udi8yZWtNYmJRN3VVbUY1RDJERFdITWJnP2k9MTUmZT02MzgyNTMwMzY2ODQ5NzkwMDI=", - eventComing.getServerCallId()); - assertEquals("411f0b00-dc73-4528-a9e6-968ba983d2a1", eventComing.getCallConnectionId()); - assertEquals("be43dd55-38e9-4de8-9d75-e20b6b32744f", eventComing.getCorrelationId()); - assertEquals("The transfer operation completed successfully.", - ((CallTransferAccepted) eventComing).getResultInformation().getMessage()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e", - ((CallTransferAccepted) eventComing).getTransferTarget().getRawId()); - assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434", - ((CallTransferAccepted) eventComing).getTransferee().getRawId()); - } - - @Test - public void parseCancelAddParticipantSucceededEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CancelAddParticipantSucceeded\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - - CancelAddParticipantSucceeded cancelAddParticipantSucceeded = (CancelAddParticipantSucceeded) event; - - assertNotNull(cancelAddParticipantSucceeded); - assertEquals("serverCallId", cancelAddParticipantSucceeded.getServerCallId()); - assertEquals("callConnectionId", cancelAddParticipantSucceeded.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", cancelAddParticipantSucceeded.getInvitationId()); - } - - @Test - public void parseCancelAddParticipantFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CancelAddParticipantFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n" - + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" + "},\n" - + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - CancelAddParticipantFailed cancelAddParticipantFailed = (CancelAddParticipantFailed) event; - - assertNotNull(cancelAddParticipantFailed); - assertEquals("serverCallId", cancelAddParticipantFailed.getServerCallId()); - assertEquals("callConnectionId", cancelAddParticipantFailed.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", cancelAddParticipantFailed.getInvitationId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(cancelAddParticipantFailed.getCallConnectionId(), - eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", eventToHandle.getInvitationId()); - }, CancelAddParticipantFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(cancelAddParticipantFailed.getCallConnectionId(), - CancelAddParticipantFailed.class); - } - - @Test - public void parseDialogCompletedEvent() { - String receivedEvent = "\n" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogCompleted\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:56.0766803+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + " }]"; - DialogCompleted event = (DialogCompleted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogStartedEvent() { - String receivedEvent = "[{\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogStarted\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.2765079+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - DialogStarted event = (DialogStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogFailedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"91f8b34b-383c-431d-9fa5-79d39fad9300\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogFailed\",\n" + " \"data\": {\n" - + " \"operationContext\": \"context\",\n" + " \"resultInformation\": {\n" - + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Operation Failed\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.5109544+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - DialogFailed event = (DialogFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Operation Failed", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogLanguageChangeEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"type\": \"Microsoft.Communication.DialogLanguageChange\",\n" + " \"data\": {\n" - + " \"selectedLanguage\": \"eng-USA\",\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"ivrContext\": \"Sanitized\",\n" - + " \"callConnectionId\": \"441fbf00-5b21-4beb-bd4d-fd665ca4b65f\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==\",\n" - + " \"correlationId\": \"fb2d738b-d9cb-496c-8be6-416aeecd4d96\"\n" + " },\n" - + " \"time\": \"2023-07-27T07:48:55.5109544+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/441fbf00-5b21-4beb-bd4d-fd665ca4b65f\"\n" + "}]"; - - DialogLanguageChange event = (DialogLanguageChange) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzc2MtMDkuY29udi5za3lwZS5jb20vY29udi9ubUpvbG9wMUhrdWhDVllYNUlxTTZnP2k9OCZlPTYzODI1NjEzMTYxNDIwOTA2MQ==", - event.getServerCallId()); - assertEquals("441fbf00-5b21-4beb-bd4d-fd665ca4b65f", event.getCallConnectionId()); - assertEquals("fb2d738b-d9cb-496c-8be6-416aeecd4d96", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - assertEquals("Sanitized", event.getIvrContext()); - } - - @Test - public void parseDialogSensitivityUpdateEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogSensitivityUpdate\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogSensitivityUpdate event - = (DialogSensitivityUpdate) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogConsentEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogConsent\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogConsent event = (DialogConsent) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogHangupEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogHangup\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogHangup event = (DialogHangup) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseDialogTransferEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.DialogTransfer\",\n" + " \"data\": {\n" - + " \"sensitiveMask\": false,\n" + " \"operationContext\": \"context\",\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Success Result\"\n" + " },\n" - + " \"dialogInputType\": \"powerVirtualAgents\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - DialogTransfer event = (DialogTransfer) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Success Result", event.getResultInformation().getMessage()); - assertEquals("92e08834-b6ee-4ede-8956-9fefa27a691c", event.getDialogId()); - assertEquals("powerVirtualAgents", event.getDialogInputType().toString()); - } - - @Test - public void parseTranscriptionStartedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionStarted\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription started successfully.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionStarted\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStarted\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"Microsoft.Communication.TranscriptionStarted\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionStarted event = (TranscriptionStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription started successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionResumedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionResumed\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription resumed.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionResumed\",\n" - + " \"transcriptionStatusDetails\": \"streamConnectionReestablished\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionResumed\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionResumed event = (TranscriptionResumed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription resumed.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_RESUMED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.STREAM_CONNECTION_REESTABLISHED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionStoppedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionStopped\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription stopped.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionStopped\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStopped\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionStopped\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionStopped event = (TranscriptionStopped) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription stopped.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_STOPPED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STOPPED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionFailedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionFailed\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 500,\n" + " \"subCode\": 9999,\n" - + " \"message\": \"Unknown internal server error.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" + " \"transcriptionStatus\": \"transcriptionFailed\",\n" - + " \"transcriptionStatusDetails\": \"unspecifiedError\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"icrosoft.Communication.TranscriptionFailed\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionFailed event = (TranscriptionFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Unknown internal server error.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_FAILED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.UNSPECIFIED_ERROR, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseTranscriptionUpdatedEvent() { - String receivedEvent = "[" + " {\n" + " \"id\": \"Sanitized\",\n" - + " \"source\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"type\": \"Microsoft.Communication.TranscriptionUpdated\",\n" + " \"data\": {\n" - + " \"resultInformation\": {\n" + " \"code\": 200,\n" + " \"subCode\": 0,\n" - + " \"message\": \"Transcription updated.\"\n" + " },\n" - + " \"transcriptionUpdate\": {\n" - + " \"transcriptionStatus\": \"transcriptionLocaleUpdated\",\n" - + " \"transcriptionStatusDetails\": \"subscriptionStarted\"\n" + " },\n" - + " \"version\": \"2023-01-15-preview\",\n" - + " \"dialogId\": \"92e08834-b6ee-4ede-8956-9fefa27a691c\",\n" - + " \"callConnectionId\": \"491f1300-0c70-4f8c-97b4-94474f2a371b\",\n" - + " \"serverCallId\": \"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==\",\n" - + " \"correlationId\": \"ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5\",\n" - + " \"publicEventType\": \"Microsoft.Communication.TranscriptionUpdated\"\n" + " },\n" - + " \"time\": \"2023-08-02T08:44:58.9826643+00:00\",\n" + " \"specversion\": \"1.0\",\n" - + " \"datacontenttype\": \"application/json\",\n" - + " \"subject\": \"calling/callConnections/491f1300-0c70-4f8c-97b4-94474f2a371b\"\n" + "}]"; - - TranscriptionUpdated event = (TranscriptionUpdated) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LXVzd2UtMDUtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9zaXBuZWVRSGIwYUN1cmNfbmF4SjB3P2k9MTAtNjAtMzAtMTI1JmU9NjM4MjY1MTkwMDQ1MzY2NjYx==", - event.getServerCallId()); - assertEquals("491f1300-0c70-4f8c-97b4-94474f2a371b", event.getCallConnectionId()); - assertEquals("ccadc1b4-7ea5-4d74-aebe-2c37ddc742a5", event.getCorrelationId()); - assertEquals("Transcription updated.", event.getResultInformation().getMessage()); - - assertNotNull(event.getTranscriptionUpdateResult()); - assertEquals(TranscriptionStatus.TRANSCRIPTION_LOCALE_UPDATED, - event.getTranscriptionUpdateResult().getTranscriptionStatus()); - assertEquals(TranscriptionStatusDetails.SUBSCRIPTION_STARTED, - event.getTranscriptionUpdateResult().getTranscriptionStatusDetails()); - } - - @Test - public void parseAnswerFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.AnswerFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" - + "},\n" + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - AnswerFailed answerFailed = (AnswerFailed) event; - - assertNotNull(answerFailed); - assertEquals("serverCallId", answerFailed.getServerCallId()); - assertEquals("callConnectionId", answerFailed.getCallConnectionId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(answerFailed.getCallConnectionId(), eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - }, AnswerFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(answerFailed.getCallConnectionId(), - AnswerFailed.class); - } - - @Test - public void parseCreateCallFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n" - + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n" - + "\"type\": \"Microsoft.Communication.CreateCallFailed\",\n" + "\"data\": {\n" - + "\"operationContext\": \"context\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n" - + "},\n" + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - - assertNotNull(event); - - CreateCallFailed createCallFailed = (CreateCallFailed) event; - - assertNotNull(createCallFailed); - assertEquals("serverCallId", createCallFailed.getServerCallId()); - assertEquals("callConnectionId", createCallFailed.getCallConnectionId()); - - CallAutomationEventProcessor callAutomationEventProcessor = new CallAutomationEventProcessor(); - callAutomationEventProcessor.attachOngoingEventProcessor(createCallFailed.getCallConnectionId(), - eventToHandle -> { - assertEquals("serverCallId", eventToHandle.getServerCallId()); - assertEquals("callConnectionId", eventToHandle.getCallConnectionId()); - }, CreateCallFailed.class); - callAutomationEventProcessor.processEvents(receivedEvent); - callAutomationEventProcessor.detachOngoingEventProcessor(createCallFailed.getCallConnectionId(), - CreateCallFailed.class); - } - - @Test - public void parseHoldFailedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldFailed\",\n" - + "\"type\": \"Microsoft.Communication.HoldFailed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 400,\n" + "\"subCode\": 8536,\n" - + "\"message\": \"Action failed, file could not be downloaded.\"\n" + "},\n" + "\"type\": \"HoldFailed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldFailed holdFailed = (HoldFailed) event; - assertNotNull(holdFailed); - assertEquals("correlationId", holdFailed.getCorrelationId()); - assertEquals("serverCallId", holdFailed.getServerCallId()); - assertEquals(400, holdFailed.getResultInformation().getCode()); - assertEquals(ReasonCode.Play.DOWNLOAD_FAILED, holdFailed.getReasonCode()); - } - - @Test - public void parseMediaStreamingStartedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"d13c62c5-721e-44b9-a680-9866c33db7e7\",\n" - + "\"source\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\n" - + "\"mediaStreamingStatus\":\"mediaStreamingStarted\",\n" - + "\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\n" + "\"version\":\"2024-06-15-preview\",\n" - + "\"callConnectionId\":\"4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0\",\n" - + "\"correlationId\":\"30f0ad34-d615-4bf3-8476-5630ae7fc3db\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\n" - + "\"time\":\"2024-05-02T11:20:42.9110236+00:00\",\n" + "\"specversion\":\"1.0\",\n" - + "\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\"}]"; - - MediaStreamingStarted event - = (MediaStreamingStarted) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0", - event.getServerCallId()); - assertEquals("4c1f5600-a9c6-4343-8979-b638a98de98f", event.getCallConnectionId()); - assertEquals("30f0ad34-d615-4bf3-8476-5630ae7fc3db", event.getCorrelationId()); - assertEquals("Action completed successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_STARTED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.SUBSCRIPTION_STARTED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parseMediaStreamingStoppedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"41039554-9475-491a-875b-08d23c5d0e75\",\n" - + "\"source\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\n" - + "\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\n" - + "\"version\":\"2024-06-15-preview\",\"callConnectionId\":\"4c1f5600-a9c6-4343-8979-b638a98de98f\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0\",\n" - + "\"correlationId\":\"30f0ad34-d615-4bf3-8476-5630ae7fc3db\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\n" - + "\"time\":\"2024-05-02T11:21:10.0261068+00:00\",\"specversion\":\"1.0\",\n" - + "\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/4c1f5600-a9c6-4343-8979-b638a98de98f\"}]"; - - MediaStreamingStopped event - = (MediaStreamingStopped) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDEtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi9LTTQteUZBUmhVYXN3T1RqbklPSXZnP2k9MTAtMTI4LTk1LTUyJmU9NjM4NTAwMTgzOTYwNzY2MzQ0", - event.getServerCallId()); - assertEquals("4c1f5600-a9c6-4343-8979-b638a98de98f", event.getCallConnectionId()); - assertEquals("30f0ad34-d615-4bf3-8476-5630ae7fc3db", event.getCorrelationId()); - assertEquals("Action completed successfully.", event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_STOPPED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.SUBSCRIPTION_STOPPED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parseMediaStreamingFailedEvent() { - String receivedEvent = "[{\n" + "\"id\":\"a9bb7545-8f87-42aa-85d0-d7120dbe2414\",\n" - + "\"source\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"type\":\"Microsoft.Communication.MediaStreamingFailed\",\n" - + "\"data\":{\"eventSource\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"operationContext\":\"startMediaStreamingContext\",\n" - + "\"resultInformation\":{\"code\":500,\"subCode\":8603,\n" - + "\"message\":\"Action failed, not able to establish websocket connection.\"},\n" - + "\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\n" - + "\"mediaStreamingStatus\":\"mediaStreamingFailed\",\n" - + "\"mediaStreamingStatusDetails\":\"streamConnectionUnsuccessful\"},\n" - + "\"version\":\"2024-06-15-preview\",\"callConnectionId\":\"761f5600-43ab-48a0-bbad-ecc5ad5b15bb\",\n" - + "\"serverCallId\":\"aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDQtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi94MVdMX0p3NnlVaW1aOEkzVi1MN3hnP2k9MTAtMTI4LTg0LTE3MSZlPTYzODQ5NzU2ODQ3MzUxNzU3Mg==\",\n" - + "\"correlationId\":\"6032c474-201d-4ad1-8900-f92a595a6d94\",\n" - + "\"publicEventType\":\"Microsoft.Communication.MediaStreamingFailed\"},\n" - + "\"time\":\"2024-05-02T12:38:31.242039+00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\n" - + "\"subject\":\"calling/callConnections/761f5600-43ab-48a0-bbad-ecc5ad5b15bb\"}]"; - - MediaStreamingFailed event = (MediaStreamingFailed) CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - assertEquals( - "aHR0cHM6Ly9hcGkuZmxpZ2h0cHJveHkuc2t5cGUuY29tL2FwaS92Mi9jcC9jb252LW1hc28tMDQtcHJvZC1ha3MuY29udi5za3lwZS5jb20vY29udi94MVdMX0p3NnlVaW1aOEkzVi1MN3hnP2k9MTAtMTI4LTg0LTE3MSZlPTYzODQ5NzU2ODQ3MzUxNzU3Mg==", - event.getServerCallId()); - assertEquals("761f5600-43ab-48a0-bbad-ecc5ad5b15bb", event.getCallConnectionId()); - assertEquals("6032c474-201d-4ad1-8900-f92a595a6d94", event.getCorrelationId()); - assertEquals("Action failed, not able to establish websocket connection.", - event.getResultInformation().getMessage()); - - assertNotNull(event.getMediaStreamingUpdateResult()); - assertEquals(MediaStreamingStatus.MEDIA_STREAMING_FAILED, - event.getMediaStreamingUpdateResult().getMediaStreamingStatus()); - assertEquals(MediaStreamingStatusDetails.STREAM_CONNECTION_UNSUCCESSFUL, - event.getMediaStreamingUpdateResult().getMediaStreamingStatusDetails()); - } - - @Test - public void parsePlayPausedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayPaused\",\n" - + "\"type\": \"Microsoft.Communication.PlayPaused\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"PlayPaused\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayPaused playPaused = (PlayPaused) event; - assertNotNull(playPaused); - assertEquals("serverCallId", playPaused.getServerCallId()); - assertEquals(200, playPaused.getResultInformation().getCode()); - } - - @Test - public void parsePlayResumedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/PlayResumed\",\n" - + "\"type\": \"Microsoft.Communication.PlayResumed\",\n" + "\"data\": {\n" + "\"resultInformation\": {\n" - + "\"code\": 200,\n" + "\"subCode\": 0,\n" + "\"message\": \"Action completed successfully.\"\n" + "},\n" - + "\"type\": \"PlayResumed\",\n" + "\"callConnectionId\": \"callConnectionId\",\n" - + "\"serverCallId\": \"serverCallId\",\n" + "\"correlationId\": \"correlationId\"\n" + "},\n" - + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" + "\"specversion\": \"1.0\",\n" - + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - PlayResumed playResumed = (PlayResumed) event; - assertNotNull(playResumed); - assertEquals("serverCallId", playResumed.getServerCallId()); - assertEquals(200, playResumed.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioCompletedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioCompleted\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioCompleted\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioCompleted\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioCompleted holdAudioCompleted = (HoldAudioCompleted) event; - assertNotNull(holdAudioCompleted); - assertEquals("serverCallId", holdAudioCompleted.getServerCallId()); - assertEquals(200, holdAudioCompleted.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioStartedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioStarted\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioStarted\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioStarted\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioStarted holdAudioStarted = (HoldAudioStarted) event; - assertNotNull(holdAudioStarted); - assertEquals("serverCallId", holdAudioStarted.getServerCallId()); - assertEquals(200, holdAudioStarted.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioPausedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioPaused\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioPaused\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioPaused\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioPaused holdAudioPaused = (HoldAudioPaused) event; - assertNotNull(holdAudioPaused); - assertEquals("serverCallId", holdAudioPaused.getServerCallId()); - assertEquals(200, holdAudioPaused.getResultInformation().getCode()); - } - - @Test - public void parseHoldAudioResumedEvent() { - String receivedEvent = "[{\n" + "\"id\": \"704a7a96-4d74-4ebe-9cd0-b7cc39c3d7b1\",\n" - + "\"source\": \"calling/callConnections/callConnectionId/HoldAudioResumed\",\n" - + "\"type\": \"Microsoft.Communication.HoldAudioResumed\",\n" + "\"data\": {\n" - + "\"resultInformation\": {\n" + "\"code\": 200,\n" + "\"subCode\": 0,\n" - + "\"message\": \"Action completed successfully.\"\n" + "},\n" + "\"type\": \"HoldAudioResumed\",\n" - + "\"callConnectionId\": \"callConnectionId\",\n" + "\"serverCallId\": \"serverCallId\",\n" - + "\"correlationId\": \"correlationId\"\n" + "},\n" + "\"time\": \"2022-08-12T03:13:25.0252763+00:00\",\n" - + "\"specversion\": \"1.0\",\n" + "\"datacontenttype\": \"application/json\",\n" - + "\"subject\": \"calling/callConnections/callConnectionId\"\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - HoldAudioResumed holdAudioResumed = (HoldAudioResumed) event; - assertNotNull(holdAudioResumed); - assertEquals("serverCallId", holdAudioResumed.getServerCallId()); - assertEquals(200, holdAudioResumed.getResultInformation().getCode()); - } - - @Test - public void incomingCallEventParsedXMSHeaderTest() { - String serverCallId = "serverCallId"; - String correlationId = "correlationId"; - CommunicationIdentifier to = new PhoneNumberIdentifier("+11234567890"); - CommunicationIdentifier from = new PhoneNumberIdentifier("+1098754321"); - String callerDisplayName = "callerDisplayName"; - String incomingCallContext = "incomingCallContext"; - CommunicationIdentifier onBehalfofCallee = from; - - CustomCallingContext customCallingContext = new CustomCallingContext(); - customCallingContext.addSipX("Test-SIP-Header", "TestSIPValue", CustomCallingContext.SipHeaderPrefix.XMSCustom); - customCallingContext.addVoip("Test-VoIP-Header", "TestVoIPValue"); - System.out.println("Added sip and voip headers successfully."); - String receivedEvent = "[{\n" + " \"id\": \"91cdb8e2-c4c2-4888-bc60-3003f09245b3\",\n" - + " \"source\": \"calling/callConnections/callConnectionId/IncomingCall\",\n" - + " \"type\": \"Microsoft.Communication.IncomingCall\",\n" + " \"data\": {\n" - + " \"to\": { \"rawId\": \"" + to.getRawId() + "\" },\n" + " \"from\": { \"rawId\": \"" - + from.getRawId() + "\" },\n" + " \"callerDisplayName\": \"" + callerDisplayName + "\",\n" - + " \"serverCallId\": \"" + serverCallId + "\",\n" + " \"customContext\": {\n" - + " \"sipHeaders\": {\n" + " \"" - + customCallingContext.getSipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getSipHeaders().values().iterator().next() + "\"\n" + " },\n" - + " \"voipHeaders\": {\n" + " \"" - + customCallingContext.getVoipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getVoipHeaders().values().iterator().next() + "\"\n" + " }\n" + " },\n" - + " \"incomingCallContext\": \"" + incomingCallContext + "\",\n" - + " \"onBehalfOfCallee\": { \"rawId\": \"" + onBehalfofCallee.getRawId() + "\" },\n" - + " \"correlationId\": \"" + correlationId + "\"\n" + " }\n" + "}]"; - - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - IncomingCall incomingCall = (IncomingCall) event; - assertNotNull(incomingCall); - assertEquals("serverCallId", incomingCall.getServerCallId()); - assertEquals("correlationId", incomingCall.getCorrelationId()); - assertEquals(to.getRawId(), incomingCall.getTo().getRawId()); - assertEquals(from.getRawId(), incomingCall.getFrom().getRawId()); - assertEquals(callerDisplayName, incomingCall.getCallerDisplayName()); - assertEquals(incomingCallContext, incomingCall.getIncomingCallContext()); - assertEquals(onBehalfofCallee.getRawId(), incomingCall.getOnBehalfOfCallee().getRawId()); - assertEquals(customCallingContext.getSipHeaders().keySet().iterator().next(), - incomingCall.getCustomContext().getSipHeaders().keySet().iterator().next()); - assertEquals(customCallingContext.getVoipHeaders().values().iterator().next(), - incomingCall.getCustomContext().getVoipHeaders().values().iterator().next()); - - } - - @Test - public void incomingCallEventParsedXHeaderTest() { - String serverCallId = "serverCallId"; - String correlationId = "correlationId"; - CommunicationIdentifier to = new PhoneNumberIdentifier("+11234567890"); - CommunicationIdentifier from = new PhoneNumberIdentifier("+1098754321"); - String callerDisplayName = "callerDisplayName"; - String incomingCallContext = "incomingCallContext"; - CommunicationIdentifier onBehalfofCallee = from; - CustomCallingContext customCallingContext = new CustomCallingContext(); - customCallingContext.addSipX("Test-SIP-Header", "TestSIPValue", CustomCallingContext.SipHeaderPrefix.X); - customCallingContext.addVoip("Test-VoIP-Header", "TestVoIPValue"); - System.out.println("Added sip and voip headers successfully."); - String receivedEvent = "[{\n" + " \"id\": \"91cdb8e2-c4c2-4888-bc60-3003f09245b3\",\n" - + " \"source\": \"calling/callConnections/callConnectionId/IncomingCall\",\n" - + " \"type\": \"Microsoft.Communication.IncomingCall\",\n" + " \"data\": {\n" - + " \"to\": { \"rawId\": \"" + to.getRawId() + "\" },\n" + " \"from\": { \"rawId\": \"" - + from.getRawId() + "\" },\n" + " \"callerDisplayName\": \"" + callerDisplayName + "\",\n" - + " \"serverCallId\": \"" + serverCallId + "\",\n" + " \"customContext\": {\n" - + " \"sipHeaders\": {\n" + " \"" - + customCallingContext.getSipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getSipHeaders().values().iterator().next() + "\"\n" + " },\n" - + " \"voipHeaders\": {\n" + " \"" - + customCallingContext.getVoipHeaders().keySet().iterator().next() + "\": \"" - + customCallingContext.getVoipHeaders().values().iterator().next() + "\"\n" + " }\n" + " },\n" - + " \"incomingCallContext\": \"" + incomingCallContext + "\",\n" - + " \"onBehalfOfCallee\": { \"rawId\": \"" + onBehalfofCallee.getRawId() + "\" },\n" - + " \"correlationId\": \"" + correlationId + "\"\n" + " }\n" + "}]"; - CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0); - assertNotNull(event); - IncomingCall incomingCall = (IncomingCall) event; - assertNotNull(incomingCall); - assertEquals("serverCallId", incomingCall.getServerCallId()); - assertEquals("correlationId", incomingCall.getCorrelationId()); - assertEquals(to.getRawId(), incomingCall.getTo().getRawId()); - assertEquals(from.getRawId(), incomingCall.getFrom().getRawId()); - assertEquals(callerDisplayName, incomingCall.getCallerDisplayName()); - assertEquals(incomingCallContext, incomingCall.getIncomingCallContext()); - assertEquals(onBehalfofCallee.getRawId(), incomingCall.getOnBehalfOfCallee().getRawId()); - assertEquals(customCallingContext.getSipHeaders().keySet().iterator().next(), - incomingCall.getCustomContext().getSipHeaders().keySet().iterator().next()); - assertEquals(customCallingContext.getVoipHeaders().values().iterator().next(), - incomingCall.getCustomContext().getVoipHeaders().values().iterator().next()); - - } - -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java index 0bb706866c1c..b95b90201352 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationUnitTestBase.java @@ -25,10 +25,7 @@ import com.azure.communication.callautomation.implementation.models.PhoneNumberIdentifierModel; import com.azure.communication.callautomation.models.MediaStreamingAudioChannel; import com.azure.communication.callautomation.models.MediaStreamingOptions; -import com.azure.communication.callautomation.models.MediaStreamingContent; -import com.azure.communication.callautomation.models.MediaStreamingTransport; import com.azure.communication.callautomation.models.TranscriptionOptions; -import com.azure.communication.callautomation.models.TranscriptionTransport; import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.core.http.HttpClient; import com.azure.core.http.HttpHeaders; @@ -63,11 +60,11 @@ public class CallAutomationUnitTestBase { static final String BOT_APP_ID = "botAppId"; static final MediaStreamingOptions MEDIA_STREAMING_CONFIGURATION - = new MediaStreamingOptions("https://websocket.url.com", MediaStreamingTransport.WEBSOCKET, - MediaStreamingContent.AUDIO, MediaStreamingAudioChannel.MIXED, true); + = new MediaStreamingOptions(MediaStreamingAudioChannel.MIXED).setTransportUrl("https://websocket.url.com") + .setStartMediaStreaming(true); static final TranscriptionOptions TRANSCRIPTION_CONFIGURATION - = new TranscriptionOptions("https://websocket.url.com", TranscriptionTransport.WEBSOCKET, "en-US", true); + = new TranscriptionOptions("en-US").setTransportUrl("https://websocket.url.com").setStartTranscription(true); public static String generateDownloadResult(String content) { return content; @@ -81,8 +78,6 @@ public static String generateCallProperties(String callConnectionId, String serv .setServerCallId(serverCallId) .setCallbackUri(callbackUri) .setCallConnectionState(CallConnectionStateModelInternal.fromString(connectionState)) - .setMediaSubscriptionId(mediaSubscriptionId) - .setDataSubscriptionId(dataSubscriptionId) .setSourceDisplayName(callerDisplayName) .setTargets( new ArrayList<>(Collections.singletonList(ModelGenerator.generateUserIdentifierModel(targetId)))); 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 94d2bcc504a9..66c46f64d0d0 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 @@ -14,7 +14,6 @@ import com.azure.communication.callautomation.models.CallParticipant; import com.azure.communication.callautomation.models.CancelAddParticipantOperationOptions; import com.azure.communication.callautomation.models.CancelAddParticipantOperationResult; -import com.azure.communication.callautomation.models.CustomCallingContext.SipHeaderPrefix; import com.azure.communication.callautomation.models.MuteParticipantOptions; import com.azure.communication.callautomation.models.MuteParticipantResult; import com.azure.communication.callautomation.models.RemoveParticipantOptions; @@ -181,44 +180,6 @@ public void transferToParticipantCallWithResponse() { assertNotNull(transferCallResultResponse.getValue()); } - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXMSHeader() { - CallConnectionAsync callConnectionAsync - = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnectionAsync(CALL_CONNECTION_ID); - - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.XMSCustom); - Response transferCallResultResponse - = callConnectionAsync.transferCallToParticipantWithResponse(transferCallToParticipantOptions).block(); - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXHeader() { - CallConnectionAsync callConnectionAsync - = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnectionAsync(CALL_CONNECTION_ID); - - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.X); - Response transferCallResultResponse - = callConnectionAsync.transferCallToParticipantWithResponse(transferCallToParticipantOptions).block(); - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - @Test public void transferToParticipantCallWithResponseWithTransferee() { CallConnectionAsync callConnectionAsync @@ -238,46 +199,6 @@ public void transferToParticipantCallWithResponseWithTransferee() { assertNotNull(transferCallResultResponse.getValue()); } - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXMSHeaderWithTransferee() { - CallConnectionAsync callConnectionAsync - = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnectionAsync(CALL_CONNECTION_ID); - - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT) - .setTransferee(new CommunicationUserIdentifier(CALL_TRANSFEREE_ID)); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.XMSCustom); - Response transferCallResultResponse - = callConnectionAsync.transferCallToParticipantWithResponse(transferCallToParticipantOptions).block(); - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXHeaderWithTransferee() { - CallConnectionAsync callConnectionAsync - = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnectionAsync(CALL_CONNECTION_ID); - - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT) - .setTransferee(new CommunicationUserIdentifier(CALL_TRANSFEREE_ID)); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.X); - Response transferCallResultResponse - = callConnectionAsync.transferCallToParticipantWithResponse(transferCallToParticipantOptions).block(); - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - @Test public void addParticipants() { CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient( 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 0a54cd0c34bd..203e29704cf5 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 @@ -20,7 +20,6 @@ import com.azure.communication.callautomation.models.RemoveParticipantResult; import com.azure.communication.callautomation.models.TransferCallResult; import com.azure.communication.callautomation.models.TransferCallToParticipantOptions; -import com.azure.communication.callautomation.models.CustomCallingContext.SipHeaderPrefix; import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.common.PhoneNumberIdentifier; import com.azure.core.http.rest.Response; @@ -181,44 +180,6 @@ public void transferToParticipantCallWithResponse() { assertNotNull(transferCallResultResponse.getValue()); } - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXMSHeader() { - CallConnection callConnection - = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnection(CALL_CONNECTION_ID); - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.XMSCustom); - Response transferCallResultResponse - = callConnection.transferCallToParticipantWithResponse(transferCallToParticipantOptions, Context.NONE); - - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - - @Test - public void transferToParticipantCallWithResponsePhoneNumberIdentifierXHeader() { - CallConnection callConnection - = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>( - serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202)))) - .getCallConnection(CALL_CONNECTION_ID); - TransferCallToParticipantOptions transferCallToParticipantOptions - = new TransferCallToParticipantOptions(new PhoneNumberIdentifier(CALL_PSTN_TARGET_ID)) - .setOperationContext(CALL_OPERATION_CONTEXT); - transferCallToParticipantOptions.getCustomCallingContext() - .addSipX("Test-Sip-Header", "Test-Sip-Value", SipHeaderPrefix.X); - Response transferCallResultResponse - = callConnection.transferCallToParticipantWithResponse(transferCallToParticipantOptions, Context.NONE); - - assertNotNull(transferCallResultResponse); - assertEquals(202, transferCallResultResponse.getStatusCode()); - assertNotNull(transferCallResultResponse.getValue()); - } - @Test public void addParticipants() { CallConnection callConnection = getCallAutomationClient( diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java deleted file mode 100644 index 4b93ca460a69..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncAutomatedLiveTests.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.*; -import com.azure.communication.callautomation.models.events.CallConnected; -import com.azure.communication.callautomation.models.events.DialogCompleted; -import com.azure.communication.callautomation.models.events.DialogStarted; -import com.azure.communication.common.CommunicationIdentifier; -import com.azure.communication.common.CommunicationUserIdentifier; -import com.azure.communication.identity.CommunicationIdentityAsyncClient; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.Response; -import com.azure.core.test.annotation.DoNotRecord; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; - -import java.time.Duration; -import java.util.*; - -import static org.junit.jupiter.api.Assertions.*; - -public class CallDialogAsyncAutomatedLiveTests extends CallAutomationAutomatedLiveTestBase { - - @DoNotRecord(skipInPlayback = true) - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - @Disabled("Disabling this for now as there is service issue with this test case") - public void dialogActionInACallAutomatedTest(HttpClient httpClient) { - /* Test case:Start and Stop Dialog on ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. Start dialog, expect no failure(exception) - * 5. Stop dialog, expect DialogCompletedEvent - * 6. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationUserIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("dialogActionInACallAutomatedTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - String receiverConnectionId = answerCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // start dialog - String dialogId = "92e08834-b6ee-4ede-8956-9fefa27a691c"; - Map dialogContext = new HashMap<>(); - StartDialogOptions options - = new StartDialogOptions(dialogId, DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - options.setBotId(BOT_APP_ID); - - CallDialogAsync callDialogAsync = answerCallResult.getCallConnectionAsync().getCallDialogAsync(); - Response dialogStateResultResponse - = callDialogAsync.startDialogWithResponse(options).block(); - assertNotNull(dialogStateResultResponse); - assertEquals(201, dialogStateResultResponse.getStatusCode()); - DialogStateResult dialogStateResult = dialogStateResultResponse.getValue(); - assertNotNull(dialogStateResult); - assertEquals(dialogId, dialogStateResult.getDialogId()); - DialogStarted dialogStarted - = waitForEvent(DialogStarted.class, receiverConnectionId, Duration.ofSeconds(20)); - assertNotNull(dialogStarted); - - // stop dialog - callDialogAsync.stopDialog(dialogId).block(); - DialogCompleted dialogCompleted - = waitForEvent(DialogCompleted.class, receiverConnectionId, Duration.ofSeconds(20)); - assertNotNull(dialogCompleted); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java deleted file mode 100644 index 92f010017ac9..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogAsyncUnitTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.http.rest.Response; -import org.junit.jupiter.api.Test; - -import java.util.*; - -import static com.azure.communication.callautomation.CallAutomationUnitTestBase.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallDialogAsyncUnitTests { - - private CallDialogAsync callDialogAsync; - - @Test - public void startDialogWithResponseTest() { - // override callDialog to mock 201 response code - CallConnectionAsync callConnectionAsync = CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialogAsync = callConnectionAsync.getCallDialogAsync(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options = new StartDialogOptions(DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - - options.setOperationContext("operationContext"); - options.setBotId(BOT_APP_ID); - - Response response = callDialogAsync.startDialogWithResponse(options).block(); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 201); - } - - @Test - public void stopDialogWithResponseTest() { - // override callDialog to mock 204 response code - CallConnectionAsync callConnectionAsync = CallAutomationUnitTestBase - .getCallConnectionAsync(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); - callDialogAsync = callConnectionAsync.getCallDialogAsync(); - - Response response = callDialogAsync.stopDialogWithResponse(DIALOG_ID).block(); - - assertEquals(response.getStatusCode(), 204); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java deleted file mode 100644 index 1e509c3fe988..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallDialogUnitTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -package com.azure.communication.callautomation; - -import com.azure.communication.callautomation.models.DialogInputType; -import com.azure.communication.callautomation.models.DialogStateResult; -import com.azure.communication.callautomation.models.StartDialogOptions; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; -import org.junit.jupiter.api.Test; - -import java.util.*; - -import static com.azure.communication.callautomation.CallAutomationUnitTestBase.*; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -public class CallDialogUnitTests { - - private CallDialog callDialog; - - @Test - public void startDialogTest() { - // override callDialog to mock 201 response code - CallConnection callConnection = CallAutomationUnitTestBase.getCallConnection(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialog = callConnection.getCallDialog(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options - = new StartDialogOptions(DIALOG_ID, DialogInputType.POWER_VIRTUAL_AGENTS, dialogContext); - - DialogStateResult response = callDialog.startDialog(options); - - assertNotNull(response); - assertEquals(response.getDialogId(), DIALOG_ID); - } - - @Test - public void startDialogWithResponseTest() { - // override callDialog to mock 201 response code - CallConnection callConnection = CallAutomationUnitTestBase.getCallConnection(new ArrayList<>( - Collections.singletonList(new AbstractMap.SimpleEntry<>(generateDialogStateResponse(), 201)))); - callDialog = callConnection.getCallDialog(); - - Map dialogContext = new HashMap<>(); - StartDialogOptions options = new StartDialogOptions(DialogInputType.AZURE_OPEN_AI, dialogContext); - - options.setOperationContext("operationContext"); - options.setBotId(BOT_APP_ID); - - Response response = callDialog.startDialogWithResponse(options, Context.NONE); - - assertNotNull(response); - assertEquals(response.getStatusCode(), 201); - } - - @Test - public void stopDialogWithResponseTest() { - // override callDialog to mock 204 response code - CallConnection callConnection = CallAutomationUnitTestBase - .getCallConnection(new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204)))); - callDialog = callConnection.getCallDialog(); - - Response response = callDialog.stopDialogWithResponse(DIALOG_ID, Context.NONE); - - assertEquals(response.getStatusCode(), 204); - } -} diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java index 013bc0aa6260..dbe4e6148d5c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncAutomatedLiveTests.java @@ -14,7 +14,6 @@ import com.azure.communication.callautomation.models.events.CallConnected; import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionStopped; import com.azure.communication.callautomation.models.events.PlayCompleted; -import com.azure.communication.callautomation.models.events.PlayStarted; import com.azure.communication.callautomation.models.events.SendDtmfTonesCompleted; import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; @@ -25,16 +24,12 @@ import com.azure.communication.phonenumbers.models.PurchasedPhoneNumber; import com.azure.communication.callautomation.models.CallParticipant; import com.azure.communication.callautomation.models.MediaStreamingAudioChannel; -import com.azure.communication.callautomation.models.MediaStreamingContent; import com.azure.communication.callautomation.models.MediaStreamingOptions; -import com.azure.communication.callautomation.models.MediaStreamingTransport; -import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.TranscriptionOptions; import com.azure.communication.callautomation.models.StartMediaStreamingOptions; import com.azure.communication.callautomation.models.StopMediaStreamingOptions; import com.azure.communication.callautomation.models.StartTranscriptionOptions; import com.azure.communication.callautomation.models.StopTranscriptionOptions; -import com.azure.communication.callautomation.models.TranscriptionTransport; import com.azure.communication.callautomation.models.events.MediaStreamingStarted; import com.azure.communication.callautomation.models.events.MediaStreamingStopped; import com.azure.communication.callautomation.models.events.TranscriptionStarted; @@ -63,11 +58,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; -import com.azure.communication.callautomation.models.events.HoldAudioResumed; -import com.azure.communication.callautomation.models.events.HoldAudioCompleted; -import com.azure.communication.callautomation.models.events.HoldAudioPaused; -import com.azure.communication.callautomation.models.events.HoldAudioStarted; - public class CallMediaAsyncAutomatedLiveTests extends CallAutomationAutomatedLiveTestBase { @ParameterizedTest @@ -432,8 +422,7 @@ public void createVOIPCallAndMediaStreamingTest(HttpClient httpClient) { // create options List targets = new ArrayList<>(Collections.singletonList(target)); MediaStreamingOptions mediaStreamingOptions - = new MediaStreamingOptions(TRANSPORT_URL, MediaStreamingTransport.WEBSOCKET, - MediaStreamingContent.AUDIO, MediaStreamingAudioChannel.MIXED, false); + = new MediaStreamingOptions(MediaStreamingAudioChannel.MIXED).setTransportUrl(TRANSPORT_URL); CreateGroupCallOptions createCallOptions = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); @@ -549,7 +538,7 @@ public void createVOIPCallAndTranscriptionTest(HttpClient httpClient) { // create a call List targets = new ArrayList<>(Collections.singletonList(target)); TranscriptionOptions transcriptionOptions - = new TranscriptionOptions(TRANSPORT_URL, TranscriptionTransport.WEBSOCKET, "en-US", false); + = new TranscriptionOptions("en-US").setTransportUrl(TRANSPORT_URL); CreateGroupCallOptions createCallOptions = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); createCallOptions.setTranscriptionOptions(transcriptionOptions); @@ -1213,247 +1202,4 @@ public void playMultipleCombinedSourcesWithPlayMediaAllTest(HttpClient httpClien } } } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void interruptAudioAndAnnounceToholdParticipantInACallTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hold the participant - * 5. interrupt audio and announce. - * 6. unhold the participant - * 7. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationUserIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("interruptAudioAndAnnounceToholdParticipantInACallTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - System.out.println("CALL CONNECTED: " + callConnected); - - // hold the participant - CallMediaAsync callMediaAsync = createCallResult.getCallConnectionAsync().getCallMediaAsync(); - callMediaAsync.hold(receiver).block(); - - sleepIfRunningAgainstService(3000); - CallConnectionAsync callConnectionAsync = callerAsyncClient.getCallConnectionAsync(callerConnectionId); - - CallParticipant participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertTrue(participantResult.isOnHold()); - - callMediaAsync.interruptAudioAndAnnounce(new FileSource().setUrl(MEDIA_SOURCE), receiver).block(); - - sleepIfRunningAgainstService(3000); - - // unhold the participant - callMediaAsync.unhold(receiver).block(); - - sleepIfRunningAgainstService(3000); - participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertFalse(participantResult.isOnHold()); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - @DisabledIfEnvironmentVariable( - named = "SKIP_LIVE_TEST", - matches = "(?i)(true)", - disabledReason = "Requires environment to be set up") - public void playMultipleFileSourcesWhenParticipantOnHoldTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. hold the participant - * 5. play a media to target participant with mutiple file prompts - * 6. unhold the participant - * 7. hang up the call. - */ - - CommunicationIdentityAsyncClient identityAsyncClient - = getCommunicationIdentityClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .buildAsyncClient(); - - List callDestructors = new ArrayList<>(); - - try { - // create caller and receiver - CommunicationUserIdentifier caller = identityAsyncClient.createUser().block(); - CommunicationIdentifier receiver = identityAsyncClient.createUser().block(); - - CallAutomationAsyncClient callerAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .sourceIdentity(caller) - .buildAsyncClient(); - - // Create call automation client for receivers. - CallAutomationAsyncClient receiverAsyncClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("playMultipleFileSourcesWhenParticipantOnHoldTest", next)) - .buildAsyncClient(); - - String uniqueId = serviceBusWithNewCall(caller, receiver); - - // create a call - List targets = Collections.singletonList(receiver); - CreateGroupCallOptions createCallOptions - = new CreateGroupCallOptions(targets, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - Response createCallResultResponse - = callerAsyncClient.createGroupCallWithResponse(createCallOptions).block(); - assertNotNull(createCallResultResponse); - CreateCallResult createCallResult = createCallResultResponse.getValue(); - assertNotNull(createCallResult); - assertNotNull(createCallResult.getCallConnectionProperties()); - String callerConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callerConnectionId); - - // wait for the incomingCallContext - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions - = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK + String.format("?q=%s", uniqueId)); - AnswerCallResult answerCallResult - = Objects.requireNonNull(receiverAsyncClient.answerCallWithResponse(answerCallOptions).block()) - .getValue(); - assertNotNull(answerCallResult); - assertNotNull(answerCallResult.getCallConnectionAsync()); - assertNotNull(answerCallResult.getCallConnectionProperties()); - callDestructors.add(answerCallResult.getCallConnectionAsync()); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callerConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // hold the participant - CallMediaAsync callMediaAsync = createCallResult.getCallConnectionAsync().getCallMediaAsync(); - PlaySource holdPlaySource = new FileSource().setUrl(MEDIA_SOURCE); - callMediaAsync.hold(receiver, holdPlaySource).block(); - sleepIfRunningAgainstService(3000); - HoldAudioStarted holdAudioStarted - = waitForEvent(HoldAudioStarted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioStarted); - - CallConnectionAsync callConnectionAsync = callerAsyncClient.getCallConnectionAsync(callerConnectionId); - CallParticipant participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertTrue(participantResult.isOnHold()); - - // Assert multiple File Sources - List playFileSources = new ArrayList(); - playFileSources.add(new FileSource().setUrl(MEDIA_SOURCE)); - playFileSources.add(new FileSource().setUrl(MEDIA_SOURCE)); - PlayOptions playOptions = new PlayOptions(playFileSources, targets); - playOptions.setInterruptHoldAudio(true); - // Play multiple files sources - callMediaAsync.playWithResponse(playOptions).block(); - HoldAudioPaused holdAudioPaused - = waitForEvent(HoldAudioPaused.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioPaused); - - PlayStarted playStarted = waitForEvent(PlayStarted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(playStarted); - - PlayCompleted playCompleted = waitForEvent(PlayCompleted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(playCompleted); - - HoldAudioResumed holdAudioResumed - = waitForEvent(HoldAudioResumed.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioResumed); - - // unhold the participant - callMediaAsync.unhold(receiver).block(); - HoldAudioCompleted holdAudioCompleted - = waitForEvent(HoldAudioCompleted.class, callerConnectionId, Duration.ofSeconds(20)); - assertNotNull(holdAudioCompleted); - - sleepIfRunningAgainstService(3000); - participantResult = callConnectionAsync.getParticipant(receiver).block(); - assertNotNull(participantResult); - assertFalse(participantResult.isOnHold()); - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } finally { - if (!callDestructors.isEmpty()) { - try { - callDestructors.forEach(callConnection -> callConnection.hangUpWithResponse(true).block()); - } catch (Exception ignored) { - // Some call might have been terminated during the test, and it will cause exceptions here. - // Do nothing and iterate to next call connection. - } - } - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java index 0877974a5d00..4210f03113af 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java @@ -12,7 +12,6 @@ import com.azure.communication.callautomation.models.DtmfTone; import com.azure.communication.callautomation.models.FileSource; import com.azure.communication.callautomation.models.HoldOptions; -import com.azure.communication.callautomation.models.InterruptAudioAndAnnounceOptions; import com.azure.communication.callautomation.models.PlayOptions; import com.azure.communication.callautomation.models.PlayToAllOptions; import com.azure.communication.callautomation.models.RecognitionChoice; @@ -566,15 +565,4 @@ public void stopMediaStreamingWithResponse() { .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) .verifyComplete(); } - - @Test - public void interruptAudioAndAnnounceWithResponseTest() { - callMedia = getMockCallMedia(202); - InterruptAudioAndAnnounceOptions options - = new InterruptAudioAndAnnounceOptions(playTextSource, new CommunicationUserIdentifier("id")); - options.setOperationContext("operationContext"); - StepVerifier.create(callMedia.interruptAudioAndAnnounceWithResponse(options)) - .consumeNextWith(response -> assertEquals(202, response.getStatusCode())) - .verifyComplete(); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java index 14822d09c7b5..2068c3f0f444 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java @@ -237,21 +237,28 @@ public void stopTranscriptionWithResponseTest() { @Test public void updateTranscriptionSpeechModelWithResponseTest() { - Response response - = callMedia.updateTranscriptionWithResponse("en-US", "customEndpoint", null, Context.NONE); + UpdateTranscriptionOptions options = new UpdateTranscriptionOptions(); + options.setLocale("en-US"); + options.setSpeechRecognitionModelEndpointId("customEndpoint"); + Response response = callMedia.updateTranscriptionWithResponse(options, Context.NONE); assertEquals(response.getStatusCode(), 202); } @Test public void updateTranscriptionOperationContextWithResponseTest() { - Response response = callMedia.updateTranscriptionWithResponse("en-US", "customEndpoint", - "unittestoperationcontext", Context.NONE); + UpdateTranscriptionOptions options = new UpdateTranscriptionOptions(); + options.setLocale("en-US"); + options.setSpeechRecognitionModelEndpointId("customEndpoint"); + options.setOperationContext("unittestoperationcontext"); + Response response = callMedia.updateTranscriptionWithResponse(options, Context.NONE); assertEquals(response.getStatusCode(), 202); } @Test public void updateTranscriptionWithResponse() { - Response response = callMedia.updateTranscriptionWithResponse("en-US", null, null, Context.NONE); + UpdateTranscriptionOptions options = new UpdateTranscriptionOptions(); + options.setLocale("en-US"); + Response response = callMedia.updateTranscriptionWithResponse(options, Context.NONE); assertEquals(response.getStatusCode(), 202); } @@ -271,13 +278,4 @@ public void stopMediaStremaingWithResponse() { Response response = callMedia.stopMediaStreamingWithResponse(options, Context.NONE); assertEquals(response.getStatusCode(), 202); } - - @Test - public void interruptAudioAndAnnounceWithResponseTest() { - InterruptAudioAndAnnounceOptions options - = new InterruptAudioAndAnnounceOptions(playTextSource, new CommunicationUserIdentifier("id")); - options.setOperationContext("operationContext"); - Response response = callMedia.interruptAudioAndAnnounceWithResponse(options, Context.NONE); - assertEquals(response.getStatusCode(), 202); - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java index 363bcea85597..90daf237cc3c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAsyncUnitTests.java @@ -45,25 +45,6 @@ public void recordingOperationsTest() { assertThrows(HttpResponseException.class, () -> callRecording.getState(RECORDING_ID).block()); } - @Test - public void recordingOperationsWithCallConnectionIdTest() { - CallAutomationAsyncClient callingServerClient - = CallAutomationUnitTestBase.getCallAutomationAsyncClient(recordingOperationsResponses); - callRecording = callingServerClient.getCallRecordingAsync(); - - validateRecordingState( - callRecording.start( - new StartRecordingOptions(CALL_CONNECTION_ID).setRecordingStateCallbackUrl("https://localhost/")), - RecordingState.ACTIVE); - - validateOperationWithRecordingState(callRecording.pause(RECORDING_ID), RecordingState.INACTIVE); - - validateOperationWithRecordingState(callRecording.resume(RECORDING_ID), RecordingState.ACTIVE); - - validateOperation(callRecording.stop(RECORDING_ID)); - assertThrows(HttpResponseException.class, () -> callRecording.getState(RECORDING_ID).block()); - } - private void validateRecordingState(Publisher publisher, RecordingState status) { StepVerifier.create(publisher) .consumeNextWith(recordingStateResponse -> validateRecording(recordingStateResponse, status)) diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java index 8697515c3d5c..7dd21d7fb41b 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java +++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallRecordingAutomatedLiveTests.java @@ -20,9 +20,6 @@ import com.azure.communication.common.CommunicationIdentifier; import com.azure.communication.common.CommunicationUserIdentifier; import com.azure.communication.identity.CommunicationIdentityClient; -import com.azure.communication.callautomation.models.FileSource; -import com.azure.core.exception.HttpResponseException; -import com.azure.communication.callautomation.models.RecordingState; import com.azure.core.http.HttpClient; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -35,8 +32,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.fail; -import com.azure.communication.callautomation.models.RecordingResult; - public class CallRecordingAutomatedLiveTests extends CallAutomationAutomatedLiveTestBase { @ParameterizedTest @MethodSource("com.azure.core.test.TestBase#getHttpClients") @@ -219,250 +214,4 @@ public void createACSCallUnmixedAudioAffinityTest(HttpClient httpClient) { fail("Unexpected exception received", ex); } } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void createACSCallAndStartRecordingWithCallConnectionIdTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. start recording with callConnectionId and the call without channel affinity - * 5. stop recording the call - * 6. hang up the call. - * 7. once call is hung up, verify disconnected event - */ - CommunicationIdentityClient communicationIdentityClient - = getCommunicationIdentityClientUsingConnectionString(httpClient).buildClient(); - - String callConnectionId = ""; - try { - // Create caller and receiver - CommunicationUserIdentifier source = communicationIdentityClient.createUser(); - CommunicationUserIdentifier target = communicationIdentityClient.createUser(); - - // Create call automation client and use source as the caller. - CallAutomationClient callerClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .sourceIdentity(source) - .buildClient(); - - // Create call automation client for receivers. - CallAutomationClient receiverClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .buildClient(); - - // setup service bus - String uniqueId = serviceBusWithNewCall(source, target); - - // create call and assert response - CreateGroupCallOptions createCallOptions = new CreateGroupCallOptions(Arrays.asList(target), - String.format("%s?q=%s", DISPATCHER_CALLBACK, uniqueId)); - CreateCallResult createCallResult - = callerClient.createGroupCallWithResponse(createCallOptions, null).getValue(); - callConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callConnectionId); - - // wait for incoming call context - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK); - AnswerCallResult answerCallResult - = receiverClient.answerCallWithResponse(answerCallOptions, null).getValue(); - assertNotNull(answerCallResult); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // get properties - CallConnectionProperties callConnectionProperties - = createCallResult.getCallConnection().getCallProperties(); - assertEquals(CallConnectionState.CONNECTED, callConnectionProperties.getCallConnectionState()); - - // start recording - handle 202 status as expected behavior - RecordingStateResult recordingStateResult = null; - String recordingId = null; - boolean is202Response = false; - - try { - recordingStateResult = callerClient.getCallRecording() - .start(new StartRecordingOptions(callConnectionId).setRecordingChannel(RecordingChannel.UNMIXED) - .setRecordingContent(RecordingContent.AUDIO) - .setRecordingFormat(RecordingFormat.WAV) - .setRecordingStateCallbackUrl(DISPATCHER_CALLBACK)); - recordingId = recordingStateResult.getRecordingId(); - } catch (HttpResponseException ex) { - if (ex.getResponse().getStatusCode() == 202) { - String responseBody = ex.getResponse().getBodyAsString().block(); - if (responseBody != null && responseBody.contains("recordingId")) { - com.fasterxml.jackson.databind.ObjectMapper mapper - = new com.fasterxml.jackson.databind.ObjectMapper(); - com.fasterxml.jackson.databind.JsonNode jsonNode = mapper.readTree(responseBody); - recordingId = jsonNode.get("recordingId").asText(); - is202Response = true; - } - } else { - throw ex; // Re-throw if it's not a 202 error - } - } - - Thread.sleep(5000); // 5 seconds delay - - assertNotNull(recordingId, "Recording ID should not be null"); - - // Play audio to ensure call is fully established (similar to .NET workaround) - CallMedia callMedia = createCallResult.getCallConnection().getCallMedia(); - FileSource playSource = new FileSource().setUrl(MEDIA_SOURCE); - callMedia.playToAll(playSource); - - // If we got a 202 response, wait for recording to become ACTIVE - if (is202Response) { - long startTime = System.currentTimeMillis(); - long timeout = 30000; // 30 seconds timeout - boolean isActive = false; - - while (System.currentTimeMillis() - startTime < timeout) { - Thread.sleep(1000); // Wait 1 second between polls - RecordingStateResult currentState = callerClient.getCallRecording().getState(recordingId); - if (currentState.getRecordingState() == RecordingState.ACTIVE) { - recordingStateResult = currentState; - isActive = true; - break; - } - } - - // Verify recording is now active - if (!isActive) { - fail("Recording did not become ACTIVE within timeout period"); - } - } - - // Add delay before stopping recording (similar to .NET) - Thread.sleep(5000); // 5 seconds delay - - // stop recording - callerClient.getCallRecording().stop(recordingId); - - // Add delay after stopping recording - Thread.sleep(5000); // 5 seconds delay - - // hangup - if (!callConnectionId.isEmpty()) { - CallConnection callConnection = callerClient.getCallConnection(callConnectionId); - callConnection.hangUp(true); - CallDisconnected callDisconnected - = waitForEvent(CallDisconnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callDisconnected); - } - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } - } - - @ParameterizedTest - @MethodSource("com.azure.core.test.TestBase#getHttpClients") - public void createACSCallAndGetCallRecordingTest(HttpClient httpClient) { - /* Test case: ACS to ACS call - * 1. create a CallAutomationClient. - * 2. create a call from source to one ACS target. - * 3. get updated call properties and check for the connected state. - * 4. start recording the call without channel affinity - * 5. stop recording the call - * 6. get the recording - * 7. hang up the call. - * 8. once call is hung up, verify disconnected event - */ - CommunicationIdentityClient communicationIdentityClient - = getCommunicationIdentityClientUsingConnectionString(httpClient).buildClient(); - - String callConnectionId = ""; - try { - // Create caller and receiver - CommunicationUserIdentifier source = communicationIdentityClient.createUser(); - CommunicationUserIdentifier target = communicationIdentityClient.createUser(); - - // Create call automation client and use source as the caller. - CallAutomationClient callerClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .sourceIdentity(source) - .buildClient(); - - // Create call automation client for receivers. - CallAutomationClient receiverClient = getCallAutomationClientUsingConnectionString(httpClient) - .addPolicy((context, next) -> logHeaders("recordingOperations", next)) - .buildClient(); - - // setup service bus - String uniqueId = serviceBusWithNewCall(source, target); - - // create call and assert response - CreateGroupCallOptions createCallOptions = new CreateGroupCallOptions(Arrays.asList(target), - String.format("%s?q=%s", DISPATCHER_CALLBACK, uniqueId)); - CreateCallResult createCallResult - = callerClient.createGroupCallWithResponse(createCallOptions, null).getValue(); - callConnectionId = createCallResult.getCallConnectionProperties().getCallConnectionId(); - assertNotNull(callConnectionId); - - // wait for incoming call context - String incomingCallContext = waitForIncomingCallContext(uniqueId, Duration.ofSeconds(10)); - assertNotNull(incomingCallContext); - - // answer the call - AnswerCallOptions answerCallOptions = new AnswerCallOptions(incomingCallContext, DISPATCHER_CALLBACK); - AnswerCallResult answerCallResult - = receiverClient.answerCallWithResponse(answerCallOptions, null).getValue(); - assertNotNull(answerCallResult); - - // wait for callConnected - CallConnected callConnected = waitForEvent(CallConnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callConnected); - - // get properties - CallConnectionProperties callConnectionProperties - = createCallResult.getCallConnection().getCallProperties(); - assertEquals(CallConnectionState.CONNECTED, callConnectionProperties.getCallConnectionState()); - - StartRecordingOptions startRecordingOptions - = new StartRecordingOptions(new ServerCallLocator(callConnectionProperties.getServerCallId())) - .setRecordingChannel(RecordingChannel.UNMIXED) - .setRecordingContent(RecordingContent.AUDIO) - .setRecordingFormat(RecordingFormat.WAV) - .setRecordingStateCallbackUrl(DISPATCHER_CALLBACK); - - // start recording - RecordingStateResult recordingStateResult = callerClient.getCallRecording().start(startRecordingOptions); - - assertNotNull(recordingStateResult.getRecordingId()); - String recordingId = recordingStateResult.getRecordingId(); - - // Play audio to ensure call is fully established - CallMedia callMedia = createCallResult.getCallConnection().getCallMedia(); - FileSource playSource = new FileSource().setUrl(MEDIA_SOURCE); - callMedia.playToAll(playSource); - - // Add delay to ensure audio is played and recording is active - Thread.sleep(5000); - - // stop recording - callerClient.getCallRecording().stop(recordingId); - Thread.sleep(60000); - - // get recording - RecordingResult recordingResult = callerClient.getCallRecording().getRecordingResult(recordingId); - assertNotNull(recordingResult); - // hangup - if (!callConnectionId.isEmpty()) { - CallConnection callConnection = callerClient.getCallConnection(callConnectionId); - callConnection.hangUp(true); - CallDisconnected callDisconnected - = waitForEvent(CallDisconnected.class, callConnectionId, Duration.ofSeconds(10)); - assertNotNull(callDisconnected); - } - } catch (Exception ex) { - fail("Unexpected exception received", ex); - } - } } diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndGetCallRecordingTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndGetCallRecordingTest.json deleted file mode 100644 index 30bc17dc8aba..000000000000 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndGetCallRecordingTest.json +++ /dev/null @@ -1 +0,0 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:49.4674666\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:49.4959737\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:52.6958443\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:52.8907467\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:23:52.9273556\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:53.0803237\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:53.2677472\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:53.5507231\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:53.779227\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:54.0659264\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:23:57.149062\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:58.0804808\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:58.2743295\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00001f80-aae4-4898-8d11-15421e4682df\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"033b4452-32f9-4945-83c6-eb1af3d6f3e7\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:24:58.7886382\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-aae4-4898-8d11-15421e4682df\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndStartRecordingWithCallConnectionIdTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndStartRecordingWithCallConnectionIdTest.json index 2b7d36b59d92..aed370073a1c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndStartRecordingWithCallConnectionIdTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndStartRecordingWithCallConnectionIdTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:25:05.0023768\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:05.004959\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:07.7581674\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:09.5358218\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:09.7228606\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:09.9258368\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:10.1334281\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:10.322062\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:10.5255051\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:10.7418973\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:10.9463563\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:25:11.198215\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:11.1603071\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:25:15.4000371\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":13,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:16.2095848\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":14,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:25:16.410948\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00001f80-bb6f-4995-880d-a22286b453e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"eb435af7-9e86-4c2b-a63a-e95c669efc80\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:25:21.5897448\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-bb6f-4995-880d-a22286b453e5\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-23T00:39:52.0543927\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:52.1119064\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:57.5448979\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:57.6729964\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:57.7963634\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:57.9382743\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:58.0628679\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:58.204901\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:58.3310655\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-23T00:39:58.5856102\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:39:58.6944046\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-23T00:40:02.8192571\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:40:04.0525181\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":13,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-23T00:40:04.6595648\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"09002280-f4ad-436e-894e-90deb0d8e8e5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"5ec95845-8d80-434e-9e6e-f83484bca930\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-23T00:40:09.7330509\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002280-f4ad-436e-894e-90deb0d8e8e5\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json index d8415494b69d..54e92234d92e 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallAndUnmixedAudioTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:29.4585579\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:29.5541878\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:33.545825\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:33.752024\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:33.9461632\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00001f80-9b85-4314-882d-5ed3505ad379\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"0983227c-240c-44b1-8bb1-70a5d3c09c02\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:23:34.0557255\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-9b85-4314-882d-5ed3505ad379\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:16.5681527\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:25:16.7573562\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:21.5656009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:21.676686\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:21.8002998\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"1a006780-0481-4472-a2b1-6d4535fbe7f9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"bc5d7e7b-92f0-43f5-80c5-fe5a35ea40f8\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:25:21.9042843\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0481-4472-a2b1-6d4535fbe7f9\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json index 0d95e1a59116..e57776a8ff8a 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createACSCallUnmixedAudioAffinityTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:39.7994194\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:39.9972133\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:43.1745307\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:43.4998214\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"00001f80-75e9-48e8-b29e-c4dfadc9c431\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"952c0d21-61ae-4e21-bc5d-bb2c04fd5a03\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:23:43.6332956\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00001f80-75e9-48e8-b29e-c4dfadc9c431\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"2f006680-4d6f-4007-a294-7046647ad887\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:29.5616761\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"2f006680-4d6f-4007-a294-7046647ad887\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:25:29.7195029\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"2f006680-4d6f-4007-a294-7046647ad887\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:32.8500256\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"2f006680-4d6f-4007-a294-7046647ad887\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:32.9597252\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"2f006680-4d6f-4007-a294-7046647ad887\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"50ec6af4-c997-47c8-8906-6952b9f4bfd9\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:25:33.0701797\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/2f006680-4d6f-4007-a294-7046647ad887\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json index 22ffa06057cb..caaa950532da 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyCancelAddParticipant.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-efe0-4bc1-b989-0e330695263d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-efe0-4bc1-b989-0e330695263d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:11.5489848\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-efe0-4bc1-b989-0e330695263d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-efe0-4bc1-b989-0e330695263d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-efe0-4bc1-b989-0e330695263d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:11.6061919\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-efe0-4bc1-b989-0e330695263d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-0202-4785-80da-65e6b0e66d19\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:11.6117332\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-0202-4785-80da-65e6b0e66d19\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:11.5506376\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\",\"type\":\"Microsoft.Communication.CancelAddParticipantSucceeded\",\"data\":{\"invitationId\":\"dff51160-0573-4f52-a4f4-aec62ebce0f4\",\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"addParticipants failed for participant 8:acs:6d889502-3d7a-41a8-befa-d21fd80e8767_00000028-43e8-922e-3441-5c3a0d002e3e. Underlying reason: The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"13002280-0202-4785-80da-65e6b0e66d19\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8afebae8-60e6-4e67-8050-6e7ddf63754a\",\"publicEventType\":\"Microsoft.Communication.CancelAddParticipantSucceeded\"},\"time\":\"2025-06-24T22:20:15.1825277\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0202-4785-80da-65e6b0e66d19\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-643f-48eb-a90e-e4fb30c72b99\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:14.4369087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-ccea-44cb-983f-62d1f15a3bf5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-ccea-44cb-983f-62d1f15a3bf5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:14.4369087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-ccea-44cb-983f-62d1f15a3bf5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-643f-48eb-a90e-e4fb30c72b99\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:14.5945456\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-ccea-44cb-983f-62d1f15a3bf5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-ccea-44cb-983f-62d1f15a3bf5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:14.5469616\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-ccea-44cb-983f-62d1f15a3bf5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\",\"type\":\"Microsoft.Communication.CancelAddParticipantSucceeded\",\"data\":{\"invitationId\":\"23ecbf4d-2600-4c4f-9781-adfa0d14dc6a\",\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"addParticipants failed for participant 8:acs:6d889502-3d7a-41a8-befa-d21fd80e8767_00000027-98e5-dac3-e84c-09bd456046cc. Underlying reason: The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"1a006780-643f-48eb-a90e-e4fb30c72b99\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"acbc8456-d4fe-4557-9199-37755d53029c\",\"publicEventType\":\"Microsoft.Communication.CancelAddParticipantSucceeded\"},\"time\":\"2025-05-22T17:22:18.5696007\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-643f-48eb-a90e-e4fb30c72b99\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json index f4a747923b9c..f555d81c2368 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenAddParticipantFinallyRemoveParticipantAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:01.9657759\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:02.0343435\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:01.9735088\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:02.1062555\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:03.5233253\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:03.5279222\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"customContext\":{\"sipHeaders\":{},\"voipHeaders\":{}},\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:05.0198512\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.2529982\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.2737384\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.2529982\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.3849109\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.AddParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.AddParticipantSucceeded\"},\"time\":\"2025-06-24T22:20:05.2529982\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.5171413\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.3698194\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.6218354\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.3698194\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.7479087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.4967014\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.8648233\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.9697359\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.5171413\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":12,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8da9-4279-9294-ef3b1e2504f3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:06.0845476\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8da9-4279-9294-ef3b1e2504f3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.6067642\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.6218354\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.7161136\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.7388621\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"Call ended for this participant as it was removed from the conversation by another participant. DiagCode: 0#5300.@\"},\"callConnectionId\":\"13002280-9a3f-4254-b0bb-97d286b0603d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:20:05.7961761\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-9a3f-4254-b0bb-97d286b0603d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.RemoveParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.RemoveParticipantSucceeded\"},\"time\":\"2025-06-24T22:20:05.7879867\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.8648233\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:05.9848364\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4636-4a9c-8ed7-1f07c09c78c3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"fcfbe4ca-6a30-414d-8af7-a29193262fd0\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:06.1112879\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4636-4a9c-8ed7-1f07c09c78c3\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:58.0673723\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:58.0673723\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:58.1421928\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:58.1344471\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:01.2778968\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.5607977\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.AddParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.AddParticipantSucceeded\"},\"time\":\"2025-05-22T17:22:01.5311025\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.6714178\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.5311025\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.7982562\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.5311025\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.9420351\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.7184212\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.0758266\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.7340451\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.195284\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.8768147\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-9906-4039-afd3-7f1360f9c66f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.3267703\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-9906-4039-afd3-7f1360f9c66f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:01.908572\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":7,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.066685\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.0752697\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":8,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.2077462\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5300,\"message\":\"The conversation has ended. DiagCode: 0#5300.@\"},\"callConnectionId\":\"1a006780-575b-4fad-af5c-30ab69bddd5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:22:02.1929357\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-575b-4fad-af5c-30ab69bddd5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.RemoveParticipantSucceeded\",\"data\":{\"participant\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.RemoveParticipantSucceeded\"},\"time\":\"2025-05-22T17:22:02.1947021\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":9,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.4048331\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":10,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.5823711\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":11,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-35c8-4991-b962-d46cef4d77e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f7856863-d80c-4ed7-90c3-83cd125a67bf\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:02.6901131\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-35c8-4991-b962-d46cef4d77e3\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json index 250213e5cb5e..20e95b1bf545 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerThenHangupAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-1188-43fc-afd4-82a18ba76069\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:53.9432884\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-4c12-4967-82a7-802b39636acd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:53.9589571\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-4c12-4967-82a7-802b39636acd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:54.0534919\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-1188-43fc-afd4-82a18ba76069\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:54.0534919\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-4c12-4967-82a7-802b39636acd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:55.2610559\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-4c12-4967-82a7-802b39636acd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-1188-43fc-afd4-82a18ba76069\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"83e6cf6a-69b0-4679-b807-39a6ad48bb51\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:55.2814439\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1188-43fc-afd4-82a18ba76069\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-3b9b-43a1-833a-3618ae420493\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:46.7892968\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-681b-42d0-a76d-cb32307cb2a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:46.7887376\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-681b-42d0-a76d-cb32307cb2a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:46.9184727\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-3b9b-43a1-833a-3618ae420493\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:46.9316196\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"1a006780-681b-42d0-a76d-cb32307cb2a1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:47.6211831\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-681b-42d0-a76d-cb32307cb2a1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"1a006780-3b9b-43a1-833a-3618ae420493\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"81b1be24-ec48-4d2e-93d7-8b5df3e1d777\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:47.6368322\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3b9b-43a1-833a-3618ae420493\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest.json index b98558c8768f..6d17f61fb962 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndAnswerWithCustomContextThenHangupAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-b902-48ca-9754-9565c46a2d3f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:47.5320277\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-cde7-4774-9b9c-b021f66fe683\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:47.5320277\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-b902-48ca-9754-9565c46a2d3f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:47.6055808\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-cde7-4774-9b9c-b021f66fe683\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:47.6192467\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-b902-48ca-9754-9565c46a2d3f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:48.0838222\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b902-48ca-9754-9565c46a2d3f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-cde7-4774-9b9c-b021f66fe683\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"ea2f8d09-4ad3-4b63-a863-1ab05256bbdb\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:48.1161214\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cde7-4774-9b9c-b021f66fe683\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:21.5519281\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:21.5438438\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-0758-4c57-938b-ff47d6ed04ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:06:21.6290238\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-0758-4c57-938b-ff47d6ed04ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:06:21.5610094\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"09002680-f8dc-4d66-906c-89d2f86b3e2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:24.3763374\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-f8dc-4d66-906c-89d2f86b3e2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"09002680-0758-4c57-938b-ff47d6ed04ef\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3af097bb-6e5a-46e4-b0d8-5f4aef0f0fa6\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-03-05T05:06:24.522503\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0758-4c57-938b-ff47d6ed04ef\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json index 8c8efb10741e..d2a78ce6af07 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndConnectCallTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-1f5a-4167-ab1d-34daa5adfc27\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:38.1057113\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-b893-441d-a9d5-1e424abe3e0f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:38.1057113\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-1f5a-4167-ab1d-34daa5adfc27\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:38.2690402\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-b893-441d-a9d5-1e424abe3e0f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:38.3362932\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":2,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-dd35-433a-ba47-421b292b3afb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:41.4646448\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-dd35-433a-ba47-421b292b3afb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:19:41.4646448\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-dd35-433a-ba47-421b292b3afb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:19:41.6942818\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"13002280-b893-441d-a9d5-1e424abe3e0f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:41.8123551\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-b893-441d-a9d5-1e424abe3e0f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"13002280-1f5a-4167-ab1d-34daa5adfc27\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:41.8469876\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1f5a-4167-ab1d-34daa5adfc27\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-dd35-433a-ba47-421b292b3afb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"a528603b-3e21-490f-ad59-bf640a19dd09\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:41.7973322\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-dd35-433a-ba47-421b292b3afb\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-1ff1-4762-9717-38be00d277a3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:31.7195783\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-11da-4e8e-a87f-a96441328e49\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:31.7195783\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-11da-4e8e-a87f-a96441328e49\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:31.8613887\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-1ff1-4762-9717-38be00d277a3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:31.8613887\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-bdd7-4846-b43f-1f068a9141e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:21:34.0509772\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":2,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-bdd7-4846-b43f-1f068a9141e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:34.048607\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-bdd7-4846-b43f-1f068a9141e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:21:34.206797\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"1a006780-bdd7-4846-b43f-1f068a9141e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:34.705931\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-bdd7-4846-b43f-1f068a9141e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"1a006780-11da-4e8e-a87f-a96441328e49\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:34.719968\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-11da-4e8e-a87f-a96441328e49\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":5001,\"message\":\"This conversation has ended.. DiagCode: 0#5001.@\"},\"callConnectionId\":\"1a006780-1ff1-4762-9717-38be00d277a3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00374108-763d-43af-bb9b-4ef4faf15504\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:34.7739593\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-1ff1-4762-9717-38be00d277a3\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json index d08212555689..432fbda6ad4e 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndMediaStreamingTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f38-41cb-9d10-2cb2399c4505\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2f38-41cb-9d10-2cb2399c4505\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:56.6488374\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f38-41cb-9d10-2cb2399c4505\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-7f07-4f71-9be6-8e26224a540b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:56.6433154\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f38-41cb-9d10-2cb2399c4505\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-2f38-41cb-9d10-2cb2399c4505\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:56.6644922\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f38-41cb-9d10-2cb2399c4505\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-7f07-4f71-9be6-8e26224a540b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:56.7765871\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\",\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStarted\",\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-7f07-4f71-9be6-8e26224a540b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\"time\":\"2025-06-24T22:22:57.5265878\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\",\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-7f07-4f71-9be6-8e26224a540b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e345a9b2-a93b-4cb0-85f3-0283bb2299ae\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\"time\":\"2025-06-24T22:22:58.6083409\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f07-4f71-9be6-8e26224a540b\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:35.1961983\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-aeb9-4dd7-a2af-4b194826995f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-aeb9-4dd7-a2af-4b194826995f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:35.1961983\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-aeb9-4dd7-a2af-4b194826995f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-aeb9-4dd7-a2af-4b194826995f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-aeb9-4dd7-a2af-4b194826995f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:35.4315714\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-aeb9-4dd7-a2af-4b194826995f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:35.4835173\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"type\":\"Microsoft.Communication.MediaStreamingStarted\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStarted\",\"mediaStreamingStatusDetails\":\"subscriptionStarted\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStarted\"},\"time\":\"2025-05-22T17:24:36.3165714\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"type\":\"Microsoft.Communication.MediaStreamingStopped\",\"data\":{\"mediaStreamingUpdate\":{\"contentType\":\"Audio\",\"mediaStreamingStatus\":\"mediaStreamingStopped\",\"mediaStreamingStatusDetails\":\"subscriptionStopped\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-3d0c-447a-aa4f-60ba0bda8a9f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f6c9ed04-25db-4738-b9c7-5b40c6fc8949\",\"publicEventType\":\"Microsoft.Communication.MediaStreamingStopped\"},\"time\":\"2025-05-22T17:24:37.430735\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-3d0c-447a-aa4f-60ba0bda8a9f\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json index b63deef689fd..c57a21df5c1c 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndRejectAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"9c626946-4e4a-4e06-924d-8a441ec6d2d4\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1f001f80-2762-4bab-acb8-949435a59629\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Call ended successfully as it was declined from callee. DiagCode: 603#0.@\"},\"callConnectionId\":\"1f001f80-2762-4bab-acb8-949435a59629\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"9c626946-4e4a-4e06-924d-8a441ec6d2d4\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:19:26.3329353\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1f001f80-2762-4bab-acb8-949435a59629\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1f001f80-2762-4bab-acb8-949435a59629\",\"type\":\"Microsoft.Communication.CreateCallFailed\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Call ended successfully as it was declined from callee. DiagCode: 603#0.@\"},\"callConnectionId\":\"1f001f80-2762-4bab-acb8-949435a59629\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"9c626946-4e4a-4e06-924d-8a441ec6d2d4\",\"publicEventType\":\"Microsoft.Communication.CreateCallFailed\"},\"time\":\"2025-06-24T22:19:26.3324159\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1f001f80-2762-4bab-acb8-949435a59629\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"af5b1dd8-13ec-4463-93e2-bce0837ffa1e\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-7c22-45f7-9657-d45124ee0175\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"1a006780-7c22-45f7-9657-d45124ee0175\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"af5b1dd8-13ec-4463-93e2-bce0837ffa1e\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-05-22T17:21:21.6106687\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-7c22-45f7-9657-d45124ee0175\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-7c22-45f7-9657-d45124ee0175\",\"type\":\"Microsoft.Communication.CreateCallFailed\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":603,\"subCode\":0,\"message\":\"Decline. DiagCode: 603#0.@\"},\"callConnectionId\":\"1a006780-7c22-45f7-9657-d45124ee0175\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"af5b1dd8-13ec-4463-93e2-bce0837ffa1e\",\"publicEventType\":\"Microsoft.Communication.CreateCallFailed\"},\"time\":\"2025-05-22T17:21:21.6106687\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-7c22-45f7-9657-d45124ee0175\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json index 54b06e9c5ab6..5f19a3edf789 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/createVOIPCallAndTranscriptionTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-1cb7-410e-8208-bf3e02278709\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:18.6815881\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f04f-45a9-979a-0c08e5326a65\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-f04f-45a9-979a-0c08e5326a65\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:18.6815881\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f04f-45a9-979a-0c08e5326a65\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f04f-45a9-979a-0c08e5326a65\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-f04f-45a9-979a-0c08e5326a65\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:18.7593458\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f04f-45a9-979a-0c08e5326a65\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-1cb7-410e-8208-bf3e02278709\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:18.7754409\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\",\"type\":\"Microsoft.Communication.TranscriptionStarted\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStarted\",\"transcriptionStatusDetails\":\"subscriptionStarted\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-1cb7-410e-8208-bf3e02278709\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStarted\"},\"time\":\"2025-06-24T22:23:19.9723473\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\",\"type\":\"Microsoft.Communication.TranscriptionStopped\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStopped\",\"transcriptionStatusDetails\":\"subscriptionStopped\"},\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-1cb7-410e-8208-bf3e02278709\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"43220e2b-118b-4f94-b3f1-040b14ae03ee\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStopped\"},\"time\":\"2025-06-24T22:23:23.0097438\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-1cb7-410e-8208-bf3e02278709\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:05.0799718\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-fcf9-444a-9ad7-c3de845c0517\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-fcf9-444a-9ad7-c3de845c0517\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:25:05.0799718\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-fcf9-444a-9ad7-c3de845c0517\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-fcf9-444a-9ad7-c3de845c0517\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-fcf9-444a-9ad7-c3de845c0517\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:25:05.1960476\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-fcf9-444a-9ad7-c3de845c0517\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:25:05.2050724\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"type\":\"Microsoft.Communication.TranscriptionStarted\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStarted\",\"transcriptionStatusDetails\":\"subscriptionStarted\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStarted\"},\"time\":\"2025-05-22T17:25:06.0517101\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"type\":\"Microsoft.Communication.TranscriptionStopped\",\"data\":{\"transcriptionUpdate\":{\"transcriptionStatus\":\"transcriptionStopped\",\"transcriptionStatusDetails\":\"subscriptionStopped\"},\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-2f32-4a23-8a56-3a6719bfdbbb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"53242855-b640-472f-8821-ef29bc8112ad\",\"publicEventType\":\"Microsoft.Communication.TranscriptionStopped\"},\"time\":\"2025-05-22T17:25:09.2506455\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2f32-4a23-8a56-3a6719bfdbbb\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json index 41d501bfc550..a1eea111b989 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/dtmfActionsInACallAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"from\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"beb1fddb-c397-419e-83e1-ee466d20fae8\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-7e79-406e-bc92-930c815afa2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c1ac08d3-9030-44c7-b362-b798de2a912d\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:34.0657423\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-7e79-406e-bc92-930c815afa2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c1ac08d3-9030-44c7-b362-b798de2a912d\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:34.1562415\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-e60a-478b-8b4c-faae2dac48ab\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-e60a-478b-8b4c-faae2dac48ab\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"beb1fddb-c397-419e-83e1-ee466d20fae8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:34.1757424\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-e60a-478b-8b4c-faae2dac48ab\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-e60a-478b-8b4c-faae2dac48ab\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-e60a-478b-8b4c-faae2dac48ab\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"beb1fddb-c397-419e-83e1-ee466d20fae8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:34.4760116\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-e60a-478b-8b4c-faae2dac48ab\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\",\"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-7e79-406e-bc92-930c815afa2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c1ac08d3-9030-44c7-b362-b798de2a912d\",\"publicEventType\":\"Microsoft.Communication.SendDtmfTonesCompleted\"},\"time\":\"2025-06-24T22:21:39.0575396\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\",\"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-7e79-406e-bc92-930c815afa2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c1ac08d3-9030-44c7-b362-b798de2a912d\",\"publicEventType\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\"},\"time\":\"2025-06-24T22:21:39.4476566\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7e79-406e-bc92-930c815afa2d\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"from\":{\"kind\":\"phoneNumber\",\"rawId\":\"REDACTED\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"8d8154c9-9280-41f4-80f3-97acbd91f176\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-75c1-4479-bec7-54f64e165a83\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-75c1-4479-bec7-54f64e165a83\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8d8154c9-9280-41f4-80f3-97acbd91f176\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:21.3976351\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-75c1-4479-bec7-54f64e165a83\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-75c1-4479-bec7-54f64e165a83\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-75c1-4479-bec7-54f64e165a83\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8d8154c9-9280-41f4-80f3-97acbd91f176\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:21.4126607\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-75c1-4479-bec7-54f64e165a83\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"phoneNumber\",\"phoneNumber\":{\"value\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"07d143ba-2a1d-4f27-93ab-aff299f9be6c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:21.5432597\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"07d143ba-2a1d-4f27-93ab-aff299f9be6c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:21.5553356\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"type\":\"Microsoft.Communication.SendDtmfTonesCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"07d143ba-2a1d-4f27-93ab-aff299f9be6c\",\"publicEventType\":\"Microsoft.Communication.SendDtmfTonesCompleted\"},\"time\":\"2025-05-22T17:23:25.244702\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"type\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"The conversation has ended. DiagCode: 0#7000.@\"},\"callConnectionId\":\"1a006780-d0cb-48d9-ab5d-fefef2a28597\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"07d143ba-2a1d-4f27-93ab-aff299f9be6c\",\"publicEventType\":\"Microsoft.Communication.ContinuousDtmfRecognitionStopped\"},\"time\":\"2025-05-22T17:23:25.797572\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d0cb-48d9-ab5d-fefef2a28597\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json index a95cb7d5d24e..a4d86dd8de2e 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/holdUnholdParticipantInACallTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-ae24-48d4-9aaf-eb721233b311\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:04.2667898\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ae24-48d4-9aaf-eb721233b311\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:04.2401368\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:23:04.3180957\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:04.3830769\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ae24-48d4-9aaf-eb721233b311\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:06.8184057\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:06.8032376\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-0b2a-4c75-8a9b-d1969a47b1ff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:10.8315164\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-0b2a-4c75-8a9b-d1969a47b1ff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ae24-48d4-9aaf-eb721233b311\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"f700033e-533f-43eb-9855-ad92fc8ce437\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:23:10.8375373\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ae24-48d4-9aaf-eb721233b311\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-f752-482f-bf95-d14be6abdaa7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:45.0698202\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-2c78-4758-b511-6c40fc7f9703\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:45.1010006\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-f752-482f-bf95-d14be6abdaa7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:45.244163\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-2c78-4758-b511-6c40fc7f9703\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:45.3230706\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-2c78-4758-b511-6c40fc7f9703\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:47.6889118\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-f752-482f-bf95-d14be6abdaa7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:47.6889118\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-f752-482f-bf95-d14be6abdaa7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:51.1364777\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-f752-482f-bf95-d14be6abdaa7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-2c78-4758-b511-6c40fc7f9703\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c74d24d9-ae35-4aa8-b28c-8cb5ae0d1391\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:51.1364777\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-2c78-4758-b511-6c40fc7f9703\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/interruptAudioAndAnnounceToholdParticipantInACallTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/interruptAudioAndAnnounceToholdParticipantInACallTest.json index f9ca8e2c4d2f..92debf9c7a4b 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/interruptAudioAndAnnounceToholdParticipantInACallTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/interruptAudioAndAnnounceToholdParticipantInACallTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-164a-4431-981d-cf9cad108149\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:28.5439834\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:28.5624607\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-164a-4431-981d-cf9cad108149\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:28.5624607\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:28.6034601\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:31.6866882\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-164a-4431-981d-cf9cad108149\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:31.6866882\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:22:35.1490177\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.PlayCanceled\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":400,\"subCode\":8508,\"message\":\"Action falied, the operation was cancelled.\"},\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.PlayCanceled\"},\"time\":\"2025-06-24T22:22:38.1529875\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-13f9-46bb-8047-19134fd583c7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:38.3817797\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-13f9-46bb-8047-19134fd583c7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-164a-4431-981d-cf9cad108149\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"00a13258-f1e0-4af5-9041-fec0b71cef97\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:38.3817797\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-164a-4431-981d-cf9cad108149\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:16.2670063\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:16.297698\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:16.3290051\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:10:16.5025027\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:20.5691432\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:20.5967382\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:10:24.7604956\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.PlayCanceled\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":400,\"subCode\":8508,\"message\":\"Action falied, the operation was cancelled.\"},\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.PlayCanceled\"},\"time\":\"2025-03-05T05:10:27.1661006\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-4820-4dab-9dc9-24d5e1e5ff2f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:27.2286743\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-4820-4dab-9dc9-24d5e1e5ff2f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"00002680-9f69-43d2-aa6d-aae32c92d187\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"045c6a37-998c-432b-a217-494d76ae28a7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:10:27.2443009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/00002680-9f69-43d2-aa6d-aae32c92d187\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json index 3d9dc19d9bc3..5b916e238a07 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMediaInACallAutomatedTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c6f8-4ede-bc95-081dfe758e3f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-c6f8-4ede-bc95-081dfe758e3f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:46.2589865\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c6f8-4ede-bc95-081dfe758e3f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-a94b-453f-8063-3f0ca94fd24b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:46.2589865\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c6f8-4ede-bc95-081dfe758e3f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-c6f8-4ede-bc95-081dfe758e3f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:46.2940437\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c6f8-4ede-bc95-081dfe758e3f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-a94b-453f-8063-3f0ca94fd24b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:46.3537619\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-a94b-453f-8063-3f0ca94fd24b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:22:46.8310146\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-a94b-453f-8063-3f0ca94fd24b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"58da7426-5ebe-4fbb-94f4-747522c0ee1e\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:22:51.0495489\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-a94b-453f-8063-3f0ca94fd24b\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dbe0-420b-97d7-9473a47cdbff\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-dbe0-420b-97d7-9473a47cdbff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:21.3886685\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dbe0-420b-97d7-9473a47cdbff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-b73a-4f46-a07a-3d073a24e425\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:21.3863257\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dbe0-420b-97d7-9473a47cdbff\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-dbe0-420b-97d7-9473a47cdbff\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:21.5289108\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dbe0-420b-97d7-9473a47cdbff\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-b73a-4f46-a07a-3d073a24e425\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:21.5456131\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-b73a-4f46-a07a-3d073a24e425\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:24:22.5551306\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-b73a-4f46-a07a-3d073a24e425\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"e81c8631-cd04-4135-980b-428c24bc1236\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:24:26.7813572\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b73a-4f46-a07a-3d073a24e425\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json index 8af74c41a8c0..93897b9647d1 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-22db-4f89-9ca4-be3804e0aa5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:45.24427\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-3735-44e4-aa32-7a98669ccb2b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:45.2538107\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-22db-4f89-9ca4-be3804e0aa5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:45.2538107\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-3735-44e4-aa32-7a98669ccb2b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:45.3058617\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-3735-44e4-aa32-7a98669ccb2b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:21:46.6465168\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-3735-44e4-aa32-7a98669ccb2b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:21:53.0262971\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-3735-44e4-aa32-7a98669ccb2b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\",\"type\":\"Microsoft.Communication.CallDisconnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":7000,\"message\":\"Call was ended by Azure Communication Service Call Automation API or a server bot. DiagCode: 0#7000.@\"},\"callConnectionId\":\"13002280-22db-4f89-9ca4-be3804e0aa5f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"c517342c-d6bf-45f9-ab0c-5e2033e176e8\",\"publicEventType\":\"Microsoft.Communication.CallDisconnected\"},\"time\":\"2025-06-24T22:21:54.1554087\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-22db-4f89-9ca4-be3804e0aa5f\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-b1ac-4387-9679-70040fcc811f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:33.4553223\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dafd-4618-b0bf-14faba5409fb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-dafd-4618-b0bf-14faba5409fb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:33.4553223\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dafd-4618-b0bf-14faba5409fb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dafd-4618-b0bf-14faba5409fb\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-dafd-4618-b0bf-14faba5409fb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:33.5654103\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dafd-4618-b0bf-14faba5409fb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-b1ac-4387-9679-70040fcc811f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:33.5654103\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-b1ac-4387-9679-70040fcc811f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:23:34.9690086\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-b1ac-4387-9679-70040fcc811f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"31a0a9b9-e466-4595-b4a6-57ab5c82c25c\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:23:41.3916428\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-b1ac-4387-9679-70040fcc811f\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json index f41cdce4dd1d..c62cd583bc00 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleCombinedSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ff5c-4955-bc81-49e193de2405\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:59.8575148\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:59.8732252\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-ff5c-4955-bc81-49e193de2405\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:59.9045638\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:59.9839161\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:01.9552091\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ff5c-4955-bc81-49e193de2405\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:01.9552091\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:22:02.6545208\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:22:09.1403395\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-ff5c-4955-bc81-49e193de2405\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:09.1739244\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-ff5c-4955-bc81-49e193de2405\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-f694-4bf1-8be2-ec1d49214f79\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"caad69b9-eed2-4d94-a701-2ec6da36501f\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:09.1739244\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-f694-4bf1-8be2-ec1d49214f79\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-e806-4819-9e70-5215fe9e06cb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:48.8723491\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:48.8723491\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:48.9979011\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-e806-4819-9e70-5215fe9e06cb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:49.0145951\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-e806-4819-9e70-5215fe9e06cb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:51.1697171\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-dc7b-4ecc-8057-abf6b92e96cd\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:51.1697171\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-dc7b-4ecc-8057-abf6b92e96cd\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-e806-4819-9e70-5215fe9e06cb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:23:51.6888037\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-e806-4819-9e70-5215fe9e06cb\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"b438b634-a03c-4461-aa3f-0329719d6c5a\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:23:58.1852567\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-e806-4819-9e70-5215fe9e06cb\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWhenParticipantOnHoldTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWhenParticipantOnHoldTest.json index ded2847186b2..5475c9ff09ff 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWhenParticipantOnHoldTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWhenParticipantOnHoldTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8225-4f0d-832c-b22bb5873bb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:21.2498653\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:21.2498653\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-8225-4f0d-832c-b22bb5873bb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:21.3755134\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:21.4569643\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:23.8599701\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8225-4f0d-832c-b22bb5873bb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:23.8594271\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.HoldAudioStarted\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.HoldAudioStarted\"},\"time\":\"2025-06-24T22:20:24.3207685\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.HoldAudioPaused\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.HoldAudioPaused\"},\"time\":\"2025-06-24T22:20:27.2356556\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:20:27.2356556\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.HoldAudioResumed\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.HoldAudioResumed\"},\"time\":\"2025-06-24T22:20:35.8064838\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:20:35.8064838\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.HoldAudioCompleted\",\"data\":{\"resultInformation\":{\"code\":400,\"subCode\":8508,\"message\":\"Action falied, the operation was cancelled.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.HoldAudioCompleted\"},\"time\":\"2025-06-24T22:20:36.3936144\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-8225-4f0d-832c-b22bb5873bb1\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:36.4880271\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-8225-4f0d-832c-b22bb5873bb1\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2753-45ef-9bca-7c2543982d95\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"72920434-5774-4493-822d-8342c43ac723\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:36.4880271\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2753-45ef-9bca-7c2543982d95\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-0b30-4194-900c-399f079be4e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:20.4810656\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-0b30-4194-900c-399f079be4e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:20.4810656\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:20.4810656\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-03-05T05:07:20.512609\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-0b30-4194-900c-399f079be4e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:24.8722385\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:24.8708139\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.HoldAudioStarted\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.HoldAudioStarted\"},\"time\":\"2025-03-05T05:07:25.55961\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.HoldAudioPaused\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.HoldAudioPaused\"},\"time\":\"2025-03-05T05:07:28.4959994\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-03-05T05:07:28.5904312\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-03-05T05:07:37.0723771\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.HoldAudioResumed\",\"data\":{\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.HoldAudioResumed\"},\"time\":\"2025-03-05T05:07:37.0757195\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.HoldAudioCompleted\",\"data\":{\"resultInformation\":{\"code\":400,\"subCode\":8508,\"message\":\"Action falied, the operation was cancelled.\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.HoldAudioCompleted\"},\"time\":\"2025-03-05T05:07:38.8190494\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-0b30-4194-900c-399f079be4e9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:38.900625\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-0b30-4194-900c-399f079be4e9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"09002680-3f46-4565-b27d-719cedd670e3\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"987aa996-a9f3-40bf-94a2-f7737fdd8963\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-03-05T05:07:38.9001028\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/09002680-3f46-4565-b27d-719cedd670e3\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json index a7f7f7977c37..e527b7985380 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-e2f6-46d2-b3d7-9440023d58a5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-e2f6-46d2-b3d7-9440023d58a5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:17.8488984\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-e2f6-46d2-b3d7-9440023d58a5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-c2c1-4194-8a15-487b56a0a925\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:17.8804819\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-e2f6-46d2-b3d7-9440023d58a5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-e2f6-46d2-b3d7-9440023d58a5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:17.8804819\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-e2f6-46d2-b3d7-9440023d58a5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-c2c1-4194-8a15-487b56a0a925\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:17.942906\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-c2c1-4194-8a15-487b56a0a925\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:21:18.4316364\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-c2c1-4194-8a15-487b56a0a925\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"d54205c4-aab5-4ee7-9b44-162fba941880\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:21:26.9240673\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c2c1-4194-8a15-487b56a0a925\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-cd5b-4193-8d38-4904d233b3bf\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:03.1032789\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-468e-4de5-81d3-017d455b3f0b\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-468e-4de5-81d3-017d455b3f0b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:23:03.1032789\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-468e-4de5-81d3-017d455b3f0b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-cd5b-4193-8d38-4904d233b3bf\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:03.2134757\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-468e-4de5-81d3-017d455b3f0b\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-468e-4de5-81d3-017d455b3f0b\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:23:03.1972523\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-468e-4de5-81d3-017d455b3f0b\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-cd5b-4193-8d38-4904d233b3bf\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:23:04.2079282\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-cd5b-4193-8d38-4904d233b3bf\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"517286f6-33d6-414f-acc3-1e26bfeabe80\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:23:12.7169485\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-cd5b-4193-8d38-4904d233b3bf\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json index 3e3dd209988b..38072b6fe043 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleFileSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-2f3b-4144-a611-6c220843a21d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:46.5418366\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:46.5834319\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2f3b-4144-a611-6c220843a21d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:46.5834319\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:20:46.6220129\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:50.1770649\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2f3b-4144-a611-6c220843a21d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:50.1770649\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:20:50.459399\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:20:59.0587707\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-2f3b-4144-a611-6c220843a21d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:59.0746701\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-2f3b-4144-a611-6c220843a21d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-cd4f-4fdc-b35d-8c8d6e15379f\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"401926f8-6bf0-4311-96ff-c420d4f372f7\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:20:59.0746701\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-cd4f-4fdc-b35d-8c8d6e15379f\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:25.6838009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:25.6838009\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:25.7937174\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:25.7937174\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:28.5292621\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:28.5301502\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:22:29.6816417\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:22:38.2727579\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d76d-4da1-a003-fa8f7d6f6af9\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:38.327154\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d76d-4da1-a003-fa8f7d6f6af9\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":6,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-0d69-4c4a-bbd9-1bf7df2bf259\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cf0ad90c-1c88-4545-99b4-ddd1a212f8b1\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:38.3196037\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-0d69-4c4a-bbd9-1bf7df2bf259\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json index 7fb55bd4d871..f57b4d2b19f8 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaAllTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:15.0197114\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-c16e-4254-bcf8-1dc39aad9c39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:15.0197114\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-c16e-4254-bcf8-1dc39aad9c39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:15.0808985\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:22:15.1883168\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:17.5987818\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-c16e-4254-bcf8-1dc39aad9c39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:17.5987818\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:22:18.5699773\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:22:23.0299336\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-c16e-4254-bcf8-1dc39aad9c39\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:23.0462769\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-c16e-4254-bcf8-1dc39aad9c39\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-016b-4a91-991c-2cc9f8eaa959\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"cfeeb6bb-3319-45b6-a311-3db480c37dae\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:22:23.0462769\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-016b-4a91-991c-2cc9f8eaa959\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:04.9186056\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:04.9186056\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:05.0124557\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:24:05.05924\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:07.4665933\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:07.4665933\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:24:07.908337\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-97e1-4f23-8dcd-b0c3446c633d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:12.4254605\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-97e1-4f23-8dcd-b0c3446c633d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:24:12.4254605\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-8e96-48a2-a220-7dc43f5d07f5\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"3e66ccf1-4572-4cfc-b2fb-6235dace319b\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:24:12.3798603\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-8e96-48a2-a220-7dc43f5d07f5\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json index 05e11ab82aa1..228eb133a069 100644 --- a/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json +++ b/sdk/communication/azure-communication-callautomation/src/test/resources/playMultipleTextSourcesWithPlayMediaTest.json @@ -1 +1 @@ -["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-7f65-41a6-9b40-6e2281d89445\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:04.1092451\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:04.163113\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-7f65-41a6-9b40-6e2281d89445\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:04.1625504\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-06-24T22:21:04.1902899\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-7f65-41a6-9b40-6e2281d89445\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:06.8832672\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":3,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:06.8832672\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-06-24T22:21:07.7201477\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2024-09-01-preview\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-06-24T22:21:12.1824544\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-6719-41c0-9e01-491c78a3ca2d\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:12.1998408\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-6719-41c0-9e01-491c78a3ca2d\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2024-09-01-preview\",\"callConnectionId\":\"13002280-7f65-41a6-9b40-6e2281d89445\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"866b60b3-1427-4c80-9c4a-7443d2556055\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-06-24T22:21:12.1998408\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/13002280-7f65-41a6-9b40-6e2281d89445\"}]"] \ No newline at end of file +["{\"to\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"from\":{\"kind\":\"communicationUser\",\"rawId\":\"REDACTED\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"serverCallId\":\"REDACTED\",\"callerDisplayName\":\"\",\"incomingCallContext\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\"}","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-6687-416d-91e2-bd5781623669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:46.0283943\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":1,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:46.0283943\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-6687-416d-91e2-bd5781623669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:46.1217393\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.CallConnected\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.CallConnected\"},\"time\":\"2025-05-22T17:22:46.1373649\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-6687-416d-91e2-bd5781623669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:48.7198313\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":true}],\"sequenceNumber\":4,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:48.7198313\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.PlayStarted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.PlayStarted\"},\"time\":\"2025-05-22T17:22:49.2878472\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.PlayCompleted\",\"data\":{\"version\":\"2025-05-15\",\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"Action completed successfully.\"},\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.PlayCompleted\"},\"time\":\"2025-05-22T17:22:53.7898512\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-6687-416d-91e2-bd5781623669\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:53.8105115\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-6687-416d-91e2-bd5781623669\"}]","[{\"id\":\"REDACTED\",\"source\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\",\"type\":\"Microsoft.Communication.ParticipantsUpdated\",\"data\":{\"participants\":[{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false},{\"identifier\":{\"rawId\":\"REDACTED\",\"kind\":\"communicationUser\",\"communicationUser\":{\"id\":\"REDACTED\"}},\"isMuted\":false,\"isOnHold\":false}],\"sequenceNumber\":5,\"resultInformation\":{\"code\":200,\"subCode\":0,\"message\":\"\"},\"version\":\"2025-05-15\",\"callConnectionId\":\"1a006780-d689-4333-a63b-3b0e06e466e7\",\"serverCallId\":\"REDACTED\",\"correlationId\":\"8b92f293-ab46-49ab-b6fd-70be475f18dc\",\"publicEventType\":\"Microsoft.Communication.ParticipantsUpdated\"},\"time\":\"2025-05-22T17:22:53.8105115\\u002B00:00\",\"specversion\":\"1.0\",\"datacontenttype\":\"application/json\",\"subject\":\"calling/callConnections/1a006780-d689-4333-a63b-3b0e06e466e7\"}]"] \ No newline at end of file diff --git a/sdk/communication/azure-communication-callautomation/swagger/README.md b/sdk/communication/azure-communication-callautomation/swagger/README.md index 25f693343687..06f4ab66e47e 100644 --- a/sdk/communication/azure-communication-callautomation/swagger/README.md +++ b/sdk/communication/azure-communication-callautomation/swagger/README.md @@ -29,10 +29,10 @@ autorest README.md --java --v4 ### Code generation settings ``` yaml -tag: package-2024-09-01-preview +tag: package-2025-05-15 use: '@autorest/java@4.1.52' require: - - https://github.com/Azure/azure-rest-api-specs/blob/1a08384511e96c42aaf18edd646baf01e5e5fc84/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/Azure/azure-rest-api-specs/blob/d87c0a3d1abbd1d1aa1b487d99e77769b6895ef4/specification/communication/data-plane/CallAutomation/readme.md java: true output-folder: ../ license-header: MICROSOFT_MIT_SMALL @@ -157,12 +157,18 @@ directive: - rename-model: from: MediaStreamingOptions to: MediaStreamingOptionsInternal +- rename-model: + from: WebSocketMediaStreamingOptions + to: WebSocketMediaStreamingOptionsInternal - rename-model: from: MediaStreamingSubscription to: MediaStreamingSubscriptionInternal - rename-model: from: TranscriptionSubscription to: TranscriptionSubscriptionInternal +- rename-model: + from: WebSocketTranscriptionOptions + to: WebSocketTranscriptionOptionsInternal - rename-model: from: DtmfOptions to: DtmfOptionsInternal @@ -220,12 +226,6 @@ directive: - rename-model: from: RecordingStorageKind to: RecordingStorageType -- rename-model: - from: CallSessionEndReason - to: CallSessionEndReasonInternal -- rename-model: - from: RecordingStorageInfo - to: RecordingStorageInfoInternal # Remove models - remove-model: AddParticipantFailed @@ -284,7 +284,6 @@ directive: - remove-model: PlayPaused - remove-model: PlayResumed - remove-model: IncomingCall -- remove-model: CallSessionEndReason ``` @@ -418,24 +417,14 @@ directive: $.name = "MediaStreamingContentTypeInternal"; ``` -### Rename MediaStreamingTransportType to MediaStreamingTransportTypeInternal - -``` yaml -directive: -- from: swagger-document - where: $.definitions.MediaStreamingTransportType["x-ms-enum"] - transform: > - $.name = "MediaStreamingTransportTypeInternal"; -``` - -### Rename TranscriptionTransportType to TranscriptionTransportTypeInternal +### Rename StreamingTransportType to StreamingTransportTypeInternal ``` yaml directive: - from: swagger-document - where: $.definitions.TranscriptionTransportType["x-ms-enum"] + where: $.definitions.StreamingTransportType["x-ms-enum"] transform: > - $.name = "TranscriptionTransportTypeInternal"; + $.name = "StreamingTransportTypeInternal"; ``` ### Rename RecognitionType to RecognitionTypeInternal