ch.loway.oss.ari4java.generated.ari_1_6_0.actions.requests.ChannelsPlayPostRequest_impl_ari_1_6_0 Maven / Gradle / Ivy
package ch.loway.oss.ari4java.generated.ari_1_6_0.actions.requests;
// ----------------------------------------------------
// THIS CLASS WAS GENERATED AUTOMATICALLY
// PLEASE DO NOT EDIT
// Generated on: Sat Aug 14 16:51:39 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_6_0.actions.*;
import ch.loway.oss.ari4java.generated.ari_1_6_0.actions.requests.*;
import ch.loway.oss.ari4java.generated.ari_1_6_0.models.*;
public class ChannelsPlayPostRequest_impl_ari_1_6_0 extends BaseAriAction
implements ChannelsPlayPostRequest {
private String channelId;
private String media;
private String lang;
private Integer offsetms;
private Integer skipms;
private String playbackId;
public ChannelsPlayPostRequest_impl_ari_1_6_0(String channelId, String media) {
this.channelId = channelId;
this.media = media;
}
public ChannelsPlayPostRequest setChannelId(String channelId) {
this.channelId = channelId;
return this;
}
public ChannelsPlayPostRequest setMedia(String media) {
this.media = media;
return this;
}
public ChannelsPlayPostRequest setLang(String lang) {
this.lang = lang;
return this;
}
public ChannelsPlayPostRequest setOffsetms(int offsetms) {
this.offsetms = offsetms;
return this;
}
public ChannelsPlayPostRequest setSkipms(int skipms) {
this.skipms = skipms;
return this;
}
public ChannelsPlayPostRequest setPlaybackId(String playbackId) {
this.playbackId = playbackId;
return this;
}
private AriRequest build() {
AriRequest ariRequest =
new AriRequest("/channels/" + encodeUrlPart(channelId) + "/play", "POST");
ariRequest.addParamQuery(HttpParam.build("media", media));
ariRequest.addParamQuery(HttpParam.build("lang", lang));
ariRequest.addParamQuery(HttpParam.build("offsetms", offsetms));
ariRequest.addParamQuery(HttpParam.build("skipms", skipms));
ariRequest.addParamQuery(HttpParam.build("playbackId", playbackId));
ariRequest.addErrorResponse(HttpResponse.build(404, "Channel not found"));
ariRequest.addErrorResponse(HttpResponse.build(409, "Channel not in a Stasis application"));
return ariRequest;
}
public Playback execute() throws RestException {
String json = httpActionSync(build());
return deserializeJson(json, Playback_impl_ari_1_6_0.class);
}
public void execute(AriCallback callback) {
httpActionAsync(build(), callback, Playback_impl_ari_1_6_0.class);
}
/* No missing signatures from interface */
}