ch.loway.oss.ari4java.generated.ari_1_5_0.actions.requests.ChannelsSnoopChannelWithIdPostRequest_impl_ari_1_5_0 Maven / Gradle / Ivy
package ch.loway.oss.ari4java.generated.ari_1_5_0.actions.requests;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated on: Sat Aug 14 16:51:38 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_1_5_0.actions.*;
import ch.loway.oss.ari4java.generated.ari_1_5_0.actions.requests.*;
import ch.loway.oss.ari4java.generated.ari_1_5_0.models.*;
public class ChannelsSnoopChannelWithIdPostRequest_impl_ari_1_5_0 extends BaseAriAction
implements ChannelsSnoopChannelWithIdPostRequest {
private String channelId;
private String snoopId;
private String spy;
private String whisper;
private String app;
private String appArgs;
public ChannelsSnoopChannelWithIdPostRequest_impl_ari_1_5_0(
String channelId, String snoopId, String app) {
this.channelId = channelId;
this.snoopId = snoopId;
this.app = app;
}
public ChannelsSnoopChannelWithIdPostRequest setChannelId(String channelId) {
this.channelId = channelId;
return this;
}
public ChannelsSnoopChannelWithIdPostRequest setSnoopId(String snoopId) {
this.snoopId = snoopId;
return this;
}
public ChannelsSnoopChannelWithIdPostRequest setSpy(String spy) {
this.spy = spy;
return this;
}
public ChannelsSnoopChannelWithIdPostRequest setWhisper(String whisper) {
this.whisper = whisper;
return this;
}
public ChannelsSnoopChannelWithIdPostRequest setApp(String app) {
this.app = app;
return this;
}
public ChannelsSnoopChannelWithIdPostRequest setAppArgs(String appArgs) {
this.appArgs = appArgs;
return this;
}
private AriRequest build() {
AriRequest ariRequest =
new AriRequest(
"/channels/" + encodeUrlPart(channelId) + "/snoop/" + encodeUrlPart(snoopId) + "",
"POST");
ariRequest.addParamQuery(HttpParam.build("spy", spy));
ariRequest.addParamQuery(HttpParam.build("whisper", whisper));
ariRequest.addParamQuery(HttpParam.build("app", app));
ariRequest.addParamQuery(HttpParam.build("appArgs", appArgs));
ariRequest.addErrorResponse(HttpResponse.build(400, "Invalid parameters"));
ariRequest.addErrorResponse(HttpResponse.build(404, "Channel not found"));
return ariRequest;
}
public Channel execute() throws RestException {
String json = httpActionSync(build());
return deserializeJson(json, Channel_impl_ari_1_5_0.class);
}
public void execute(AriCallback callback) {
httpActionAsync(build(), callback, Channel_impl_ari_1_5_0.class);
}
/* No missing signatures from interface */
}