ch.loway.oss.ari4java.generated.ari_4_0_0.actions.requests.BridgesAddChannelPostRequest_impl_ari_4_0_0 Maven / Gradle / Ivy
package ch.loway.oss.ari4java.generated.ari_4_0_0.actions.requests;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated on: Sat Aug 14 16:51:42 SAST 2021
// ----------------------------------------------------
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.net.URLEncoder;
import com.fasterxml.jackson.core.type.TypeReference;
import ch.loway.oss.ari4java.ARI;
import ch.loway.oss.ari4java.tools.*;
import ch.loway.oss.ari4java.generated.*;
import ch.loway.oss.ari4java.generated.actions.*;
import ch.loway.oss.ari4java.generated.actions.requests.*;
import ch.loway.oss.ari4java.generated.models.Module;
import ch.loway.oss.ari4java.generated.models.*;
import ch.loway.oss.ari4java.generated.ari_4_0_0.actions.*;
import ch.loway.oss.ari4java.generated.ari_4_0_0.actions.requests.*;
import ch.loway.oss.ari4java.generated.ari_4_0_0.models.*;
public class BridgesAddChannelPostRequest_impl_ari_4_0_0 extends BaseAriAction
implements BridgesAddChannelPostRequest {
private String bridgeId;
private String channel;
private String role;
private Boolean absorbDTMF;
private Boolean mute;
public BridgesAddChannelPostRequest_impl_ari_4_0_0(String bridgeId, String channel) {
this.bridgeId = bridgeId;
this.channel = channel;
}
public BridgesAddChannelPostRequest setBridgeId(String bridgeId) {
this.bridgeId = bridgeId;
return this;
}
public BridgesAddChannelPostRequest setChannel(String channel) {
this.channel = channel;
return this;
}
public BridgesAddChannelPostRequest setRole(String role) {
this.role = role;
return this;
}
public BridgesAddChannelPostRequest setAbsorbDTMF(boolean absorbDTMF) {
this.absorbDTMF = absorbDTMF;
return this;
}
public BridgesAddChannelPostRequest setMute(boolean mute) {
this.mute = mute;
return this;
}
private AriRequest build() {
AriRequest ariRequest =
new AriRequest("/bridges/" + encodeUrlPart(bridgeId) + "/addChannel", "POST");
ariRequest.addParamQuery(HttpParam.build("channel", channel));
ariRequest.addParamQuery(HttpParam.build("role", role));
ariRequest.addParamQuery(HttpParam.build("absorbDTMF", absorbDTMF));
ariRequest.addParamQuery(HttpParam.build("mute", mute));
ariRequest.addErrorResponse(HttpResponse.build(400, "Channel not found"));
ariRequest.addErrorResponse(HttpResponse.build(404, "Bridge not found"));
ariRequest.addErrorResponse(
HttpResponse.build(409, "Bridge not in Stasis application; Channel currently recording"));
ariRequest.addErrorResponse(HttpResponse.build(422, "Channel not in Stasis application"));
return ariRequest;
}
public void execute() throws RestException {
httpActionSync(build());
}
public void execute(AriCallback callback) {
httpActionAsync(build(), callback);
}
public BridgesAddChannelPostRequest setInhibitConnectedLineUpdates(
boolean inhibitConnectedLineUpdates) {
throw new UnsupportedOperationException("Method available from ari_7_0_0");
}
}