diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantRequestInternal.java index 417b19f57bdd2..48b7a39da1036 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantRequestInternal.java @@ -21,7 +21,7 @@ public final class AddParticipantRequestInternal { /* * (Optional) The display name of the source that is associated with this * invite operation when - * adding a PSTN participant or teams user. Note: Will not update the + * adding a PSTN participant or teams user. Note: Will not update the * display name in the roster. */ @JsonProperty(value = "sourceDisplayName") diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java index a1923236ad174..4c1d883c0c026 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java @@ -61,6 +61,12 @@ public final class CreateCallRequestInternal { @JsonProperty(value = "azureCognitiveServicesEndpointUrl") private String azureCognitiveServicesEndpointUrl; + /* + * Used by customer to send custom context to targets + */ + @JsonProperty(value = "customContext") + private CustomContext customContext; + /** * Get the targets property: The targets of the call. * @@ -225,4 +231,24 @@ public CreateCallRequestInternal setAzureCognitiveServicesEndpointUrl(String azu this.azureCognitiveServicesEndpointUrl = azureCognitiveServicesEndpointUrl; return this; } + + /** + * Get the customContext property: Used by customer to send custom context to targets. + * + * @return the customContext value. + */ + public CustomContext getCustomContext() { + return this.customContext; + } + + /** + * Set the customContext property: Used by customer to send custom context to targets. + * + * @param customContext the customContext value to set. + * @return the CreateCallRequestInternal object itself. + */ + public CreateCallRequestInternal setCustomContext(CustomContext customContext) { + this.customContext = customContext; + return this; + } } 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 e9b377f1fac4c..b5e4e3ed3f17b 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 @@ -22,6 +22,12 @@ public final class RedirectCallRequestInternal { @JsonProperty(value = "target", required = true) private CommunicationIdentifierModel target; + /* + * Used by customer to send custom context to targets + */ + @JsonProperty(value = "customContext") + private CustomContext customContext; + /** * Get the incomingCallContext property: The context associated with the call. * @@ -61,4 +67,24 @@ public RedirectCallRequestInternal setTarget(CommunicationIdentifierModel target this.target = target; return this; } + + /** + * Get the customContext property: Used by customer to send custom context to targets. + * + * @return the customContext value. + */ + public CustomContext getCustomContext() { + return this.customContext; + } + + /** + * Set the customContext property: Used by customer to send custom context to targets. + * + * @param customContext the customContext value to set. + * @return the RedirectCallRequestInternal object itself. + */ + public RedirectCallRequestInternal setCustomContext(CustomContext customContext) { + this.customContext = customContext; + return this; + } } diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantFailed.java new file mode 100644 index 0000000000000..d300ea6a59c4d --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantFailed.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The failed to remove participant event. */ +@Fluent +public final class RemoveParticipantFailed { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId") + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling mid-call actions to correlate the request + * to the response event. + */ + @JsonProperty(value = "operationContext") + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation") + private ResultInformation resultInformation; + + /* + * Participant + */ + @JsonProperty(value = "participant") + private CommunicationIdentifierModel participant; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Set the callConnectionId property: Call connection ID. + * + * @param callConnectionId the callConnectionId value to set. + * @return the RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed setCallConnectionId(String callConnectionId) { + this.callConnectionId = callConnectionId; + return this; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed 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. + */ + 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 RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * 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; + } + + /** + * Set the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @param resultInformation the resultInformation value to set. + * @return the RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed setResultInformation(ResultInformation resultInformation) { + this.resultInformation = resultInformation; + return this; + } + + /** + * Get the participant property: Participant. + * + * @return the participant value. + */ + public CommunicationIdentifierModel getParticipant() { + return this.participant; + } + + /** + * Set the participant property: Participant. + * + * @param participant the participant value to set. + * @return the RemoveParticipantFailed object itself. + */ + public RemoveParticipantFailed setParticipant(CommunicationIdentifierModel participant) { + this.participant = participant; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantSucceeded.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantSucceeded.java new file mode 100644 index 0000000000000..8f1a2c0f09198 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RemoveParticipantSucceeded.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.communication.callautomation.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The participant removed event. */ +@Fluent +public final class RemoveParticipantSucceeded { + /* + * Call connection ID. + */ + @JsonProperty(value = "callConnectionId") + private String callConnectionId; + + /* + * Server call ID. + */ + @JsonProperty(value = "serverCallId") + private String serverCallId; + + /* + * Correlation ID for event to call correlation. Also called ChainId for + * skype chain ID. + */ + @JsonProperty(value = "correlationId") + private String correlationId; + + /* + * Used by customers when calling mid-call actions to correlate the request + * to the response event. + */ + @JsonProperty(value = "operationContext") + private String operationContext; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation") + private ResultInformation resultInformation; + + /* + * Participant + */ + @JsonProperty(value = "participant") + private CommunicationIdentifierModel participant; + + /** + * Get the callConnectionId property: Call connection ID. + * + * @return the callConnectionId value. + */ + public String getCallConnectionId() { + return this.callConnectionId; + } + + /** + * Set the callConnectionId property: Call connection ID. + * + * @param callConnectionId the callConnectionId value to set. + * @return the RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded setCallConnectionId(String callConnectionId) { + this.callConnectionId = callConnectionId; + return this; + } + + /** + * Get the serverCallId property: Server call ID. + * + * @return the serverCallId value. + */ + public String getServerCallId() { + return this.serverCallId; + } + + /** + * Set the serverCallId property: Server call ID. + * + * @param serverCallId the serverCallId value to set. + * @return the RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded setServerCallId(String serverCallId) { + this.serverCallId = serverCallId; + return this; + } + + /** + * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @return the correlationId value. + */ + public String getCorrelationId() { + return this.correlationId; + } + + /** + * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain + * ID. + * + * @param correlationId the correlationId value to set. + * @return the RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded 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. + */ + 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 RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded setOperationContext(String operationContext) { + this.operationContext = operationContext; + return this; + } + + /** + * 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; + } + + /** + * Set the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services. + * + * @param resultInformation the resultInformation value to set. + * @return the RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded setResultInformation(ResultInformation resultInformation) { + this.resultInformation = resultInformation; + return this; + } + + /** + * Get the participant property: Participant. + * + * @return the participant value. + */ + public CommunicationIdentifierModel getParticipant() { + return this.participant; + } + + /** + * Set the participant property: Participant. + * + * @param participant the participant value to set. + * @return the RemoveParticipantSucceeded object itself. + */ + public RemoveParticipantSucceeded setParticipant(CommunicationIdentifierModel participant) { + this.participant = participant; + return this; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartCallRecordingRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartCallRecordingRequestInternal.java index b9b97db87898b..3a1feecb0d05a 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartCallRecordingRequestInternal.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartCallRecordingRequestInternal.java @@ -48,7 +48,7 @@ public final class StartCallRecordingRequestInternal { * `audioChannelParticipantOrdering is not specified, * the audio channel to participant mapping will be automatically assigned * based on the order in which participant - * first audio was detected. Channel to participant mapping details can be + * first audio was detected. Channel to participant mapping details can be * found in the metadata of the recording. */ @JsonProperty(value = "audioChannelParticipantOrdering") diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/ParticipantsUpdated.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/ParticipantsUpdated.java index 1a5614f75f3e8..5430b0074385d 100644 --- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/ParticipantsUpdated.java +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/ParticipantsUpdated.java @@ -26,8 +26,12 @@ public final class ParticipantsUpdated extends CallAutomationEventBase { @JsonIgnore private final List participants; + @JsonProperty(value = "sequenceNumber") + private final int sequenceNumber; + @JsonCreator private ParticipantsUpdated(@JsonProperty("participants") List> participants) { + this.sequenceNumber = 0; ObjectMapper mapper = new ObjectMapper(); mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); this.participants = participants diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantFailed.java new file mode 100644 index 0000000000000..90b31fc65105d --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantFailed.java @@ -0,0 +1,59 @@ +// 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.events; + +import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callautomation.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.Map; + +/** The RemoveParticipantFailed model. */ +@Immutable +public final class RemoveParticipantFailed extends CallAutomationEventBase { + /* + * Participant removed + */ + @JsonIgnore + private final CommunicationIdentifier participant; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation") + private final ResultInformation resultInformation; + + @JsonCreator + private RemoveParticipantFailed(@JsonProperty("participant") Map participant) { + this.resultInformation = null; + ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + this.participant = CommunicationIdentifierConverter.convert(mapper.convertValue(participant, CommunicationIdentifierModel.class)); + } + + /** + * Get the participant property: Participant added. + * + * @return the participant value. + */ + public CommunicationIdentifier getParticipant() { + return this.participant; + } + + /** + * 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; + } +} diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantSucceeded.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantSucceeded.java new file mode 100644 index 0000000000000..1cff2eb99a839 --- /dev/null +++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/RemoveParticipantSucceeded.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.communication.callautomation.models.events; + +import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter; +import com.azure.communication.callautomation.implementation.models.CommunicationIdentifierModel; +import com.azure.communication.common.CommunicationIdentifier; +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; + +import java.util.Map; + +/** The RemoveParticipantSucceeded model. */ +@Immutable +public final class RemoveParticipantSucceeded extends CallAutomationEventBase { + /* + * Participant removed + */ + @JsonIgnore + private final CommunicationIdentifier participant; + + /* + * Contains the resulting SIP code/sub-code and message from NGC services. + */ + @JsonProperty(value = "resultInformation") + private final ResultInformation resultInformation; + + @JsonCreator + private RemoveParticipantSucceeded(@JsonProperty("participant") Map participant) { + this.resultInformation = null; + ObjectMapper mapper = new ObjectMapper(); + mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); + this.participant = CommunicationIdentifierConverter.convert(mapper.convertValue(participant, CommunicationIdentifierModel.class)); + } + + /** + * Get the participant property: Participant added. + * + * @return the participant value. + */ + public CommunicationIdentifier getParticipant() { + return this.participant; + } + + /** + * 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; + } +} diff --git a/sdk/communication/azure-communication-callautomation/swagger/README.md b/sdk/communication/azure-communication-callautomation/swagger/README.md index e3e81cec0a2e0..51f97ebda885f 100644 --- a/sdk/communication/azure-communication-callautomation/swagger/README.md +++ b/sdk/communication/azure-communication-callautomation/swagger/README.md @@ -33,7 +33,7 @@ To update generated files for call automation, run the following command ``` yaml tag: package-2023-01-15-preview require: - - https://raw.githubusercontent.com/williamzhao87/azure-rest-api-specs/16e36eb7d466ceb8eb2acb522abe273713f0c38f/specification/communication/data-plane/CallAutomation/readme.md + - https://github.com/williamzhao87/azure-rest-api-specs/blob/eb83f61948a31a69ba1e641c235f66edfc2f0425/specification/communication/data-plane/CallAutomation/readme.md java: true output-folder: ../ license-header: MICROSOFT_MIT_SMALL