Skip to content

Commit

Permalink
Applying comments from Azure Board. (#33159)
Browse files Browse the repository at this point in the history
* to receive a list of participants for Mute/Unmute operations.
* removes MuteAll and UnmuteAll.
* Rename ACSCallParticipantInternal for CallParticipantInternal.
  • Loading branch information
cochi2 authored Jan 31, 2023
1 parent b15b537 commit 789b4f6
Show file tree
Hide file tree
Showing 21 changed files with 436 additions and 1,468 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@
import com.azure.communication.callautomation.models.CallingServerErrorException;
import com.azure.communication.callautomation.models.HangUpOptions;
import com.azure.communication.callautomation.models.ListParticipantsResult;
import com.azure.communication.callautomation.models.MuteAllParticipantsOptions;
import com.azure.communication.callautomation.models.MuteParticipantOptions;
import com.azure.communication.callautomation.models.MuteParticipantsOptions;
import com.azure.communication.callautomation.models.MuteParticipantsResult;
import com.azure.communication.callautomation.models.RemoveParticipantsOptions;
import com.azure.communication.callautomation.models.RemoveParticipantsResult;
import com.azure.communication.callautomation.models.TransferCallResult;
import com.azure.communication.callautomation.models.TransferToParticipantCallOptions;
import com.azure.communication.callautomation.models.UnmuteAllParticipantsOptions;
import com.azure.communication.callautomation.models.UnmuteParticipantOptions;
import com.azure.communication.callautomation.models.UnmuteParticipantsOptions;
import com.azure.communication.callautomation.models.UnmuteParticipantsResult;
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.core.annotation.ReturnType;
Expand Down Expand Up @@ -226,89 +224,46 @@ public Response<RemoveParticipantsResult> removeParticipantsWithResponse(RemoveP
}

/**
* Mutes a single participant in the call.
* @param targetParticipant - Participant to be muted.
* Mutes participants in the call.
*
* @param targetParticipant - Participant to be muted. Only ACS Users are currently supported.
* @return A MuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public MuteParticipantsResult muteParticipant(CommunicationIdentifier targetParticipant) {
return callConnectionAsync.muteParticipantAsync(targetParticipant).block();
public MuteParticipantsResult muteParticipants(CommunicationIdentifier targetParticipant) {
return callConnectionAsync.muteParticipantsAsync(targetParticipant).block();
}

/**
* Mute a single participant in the call.
* @param muteParticipantOptions - Options for the request.
* Mute participants in the call.
* @param muteParticipantsOptions - Options for the request.
* @param context A {@link Context} representing the request context.
* @return a Response containing the MuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<MuteParticipantsResult> muteParticipantWithResponse(MuteParticipantOptions muteParticipantOptions, Context context) {
return callConnectionAsync.muteParticipantWithResponseInternal(muteParticipantOptions, context).block();
}

/**
* Mute all participants in the call, except for the initiator.
* @param requestInitiator Optional - if passed, this participant won't be muted. If not passed,
* the server won't be muted.
* @return a MuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public MuteParticipantsResult muteAllParticipants(CommunicationIdentifier requestInitiator) {
return callConnectionAsync.muteAllParticipantsAsync(requestInitiator).block();
}


/**
* Mute all participants in the call, except for the initiator.
* @param options - Options for the operation.
* @param context A {@link Context} representing the request context.
* @return a Response containing a MuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<MuteParticipantsResult> muteAllParticipantsWithResponse(MuteAllParticipantsOptions options, Context context) {
return callConnectionAsync.muteAllParticipantsWithResponseInternal(options, context).block();
public Response<MuteParticipantsResult> muteParticipantsWithResponse(MuteParticipantsOptions muteParticipantsOptions, Context context) {
return callConnectionAsync.muteParticipantWithResponseInternal(muteParticipantsOptions, context).block();
}

/**
* Unmutes a single participant in the call.
* @param targetParticipant - Participant to be muted.
* Unmutes participants in the call.
* @param targetParticipant - Participant to be unmuted. Only ACS Users are currently supported.
* @return An UnmuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UnmuteParticipantsResult unmuteParticipant(CommunicationIdentifier targetParticipant) {
return callConnectionAsync.unmuteParticipantAsync(targetParticipant).block();
public UnmuteParticipantsResult unmuteParticipants(CommunicationIdentifier targetParticipant) {
return callConnectionAsync.unmuteParticipantsAsync(targetParticipant).block();
}

/**
* Mute a single participant in the call.
* @param unmuteParticipantOptions - Options for the request.
* Unmutes participants in the call.
* @param unmuteParticipantsOptions - Options for the request.
* @param context A {@link Context} representing the request context.
* @return a Response containing the UnmuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<UnmuteParticipantsResult> unmuteParticipantWithResponse(UnmuteParticipantOptions unmuteParticipantOptions, Context context) {
return callConnectionAsync.unmuteParticipantWithResponseInternal(unmuteParticipantOptions, context).block();
}

/**
* Unmute all participants in the call.
* @return an UnmuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public UnmuteParticipantsResult unmuteAllParticipants() {
return callConnectionAsync.unmuteAllParticipantsAsync().block();
}


/**
* Unmute all participants in the call, except for the initiator.
* @param options - Options for the operation.
* @param context A {@link Context} representing the request context.
* @return a Response containing an UnmuteParticipantsResult object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<UnmuteParticipantsResult> unmuteAllParticipantsWithResponse(UnmuteAllParticipantsOptions options, Context context) {
return callConnectionAsync.unmuteAllParticipantsWithResponseInternal(options, context).block();
public Response<UnmuteParticipantsResult> unmuteParticipantsWithResponse(UnmuteParticipantsOptions unmuteParticipantsOptions, Context context) {
return callConnectionAsync.unmuteParticipantWithResponseInternal(unmuteParticipantsOptions, context).block();
}

//region Content management Actions
Expand Down
Loading

0 comments on commit 789b4f6

Please sign in to comment.